playMaker

Author Topic: HIERARCHY and PROJECT - SLOWDOWN in UNITY EDITOR [solved]  (Read 8321 times)

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
HIERARCHY and PROJECT - SLOWDOWN in UNITY EDITOR [solved]
« on: February 18, 2016, 07:02:23 PM »
So I've noticed my unity is really starting to pinwheel when clicking on objects with FSMS and editing FSMS.

Any tips to improve performance?

Could it also be the fact I have 8 prefab objects (each with 32 FSM script components) (I also plan on duplicating these.)
« Last Edit: March 08, 2016, 01:58:38 AM by Tonda »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Too many FSMs?
« Reply #1 on: February 18, 2016, 07:19:10 PM »
What versions of Unity and Playmaker are you using?

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs?
« Reply #2 on: February 18, 2016, 07:23:37 PM »
Unity 5.3.2f1 personal
playmaker 1.7.8.4

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Too many FSMs?
« Reply #3 on: February 18, 2016, 07:30:40 PM »
With Unity 5.3+ you should use Playmaker 1.8.0 - it fixes some compatibility issues. Not sure if it will fix the editor perf in your case, but you should update to see...

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs?
« Reply #4 on: February 18, 2016, 07:37:21 PM »
Will do.

One additional thought, could this have something to do with editing prefabs?
I had to uncheck this box to edit them (attached).

I've also noticed some slowdown when dealing with stuff like this:


Im going to update now.

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs?
« Reply #5 on: February 18, 2016, 08:45:06 PM »
EDIT 2: The update did not fix the issues. I will try to provide more issues.
It seems copying and pasting actions into new states causing some major pinwheels (that wasn't happening a few days ago for me in this project) As well as moving the order of actions around in an FSM.

As well as clicking on other states in the FSM.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Too many FSMs?
« Reply #6 on: February 18, 2016, 10:50:51 PM »
Looking at the repetition in your graph I'd guess you could eliminate a huge number of states by using arrays... E.g., your tiles would be stored in an array and then you would get the tile at an "index" in the array and check that.

As for the editor slowdown, the next update will include an option to disable Undo/Redo. The Undo system became more expensive in Unity 5 and, until we can figure out what to do about it, having the option to disable Undo might be an acceptable workaround for some people...

EDIT: You can read more about array variables here:
https://hutonggames.fogbugz.com/default.asp?W1243
« Last Edit: February 18, 2016, 10:53:07 PM by Alex Chouls »

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs?
« Reply #7 on: February 19, 2016, 09:42:30 AM »
Yes, I've thought about using arrays for this, but i couldn't quite wrap my head around a solution for my particular needs - will go deeper.

More issues about my problem = It's Hierarchy and Project Panel lag, taking up to 10 seconds when you click on items (mostly objects with FSM scripts.) I've found some reports of this online of Hierarchy lag with objects with multiple scripts, and I'm assuming this has something to do with it...

So efficient of me...

« Last Edit: February 19, 2016, 09:45:25 AM by Tonda »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Too many FSMs?
« Reply #8 on: February 19, 2016, 09:48:44 AM »
Question: Does it lag in the build version?

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs?
« Reply #9 on: February 19, 2016, 07:22:17 PM »
No and Scene View does not lag either, it only lags when clicking items in hierarchy and project panels when clicking on or moving items - (making work near impossible)

This is some other documentation of the same issue I think : http://answers.unity3d.com/questions/136829/hierarchy-manipulation-are-really-slow.html


EDIT: Also moving around States within the Playmaker window often triggers this 5 second delay (Note: this was not happening a few days ago.)
« Last Edit: February 19, 2016, 08:54:14 PM by Tonda »

ermak

  • Junior Playmaker
  • **
  • Posts: 60
    • AL Games
Re: Too many FSMs?
« Reply #10 on: February 20, 2016, 06:07:26 AM »
Tonda I have the same issues like you - very very game objects + FSMs + delay...
I think I found a solution, but only for this problem:

Also moving around States within the Playmaker window often triggers this 5 second delay (Note: this was not happening a few days ago.)

If you are using Prefab - make "Break Prefab Instance" and try to manipulate "states boxes" in Playmaker Window, but in game object from the scene "Hierarchy window", not the prefab game object.
This working for me and "states boxes" are moving very fast. If you make prefab... they will slowing again sometimes.

But some of the other issues remain...

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs?
« Reply #11 on: February 21, 2016, 07:19:55 AM »
Unfortunately that won't help me as I have lots of prefab links and can't break them.

EDIT: to provide more documentation, here's another account of this issue : http://answers.unity3d.com/questions/1109686/unity-is-really-slow-when-selecting.html


From that thread : 
Quote
"Internal_CallUpdateFunctions sounds like you have a poorly written editor script which does heavy stuff inside the update delegate. The 5 second freeze might be related to heavy stuff inside a OnSelectionChanged / OnHierachyChanged callbacks."

In my case, the only scripts I use are playmaker fsms.

SOooo.. My big question is: Could there be a way to turn off the "live" updating of FSM scripts while editing? Think that would fix my issue.

EDIT 3: Funny enough, the problem doesn't occur while editing in "Game mode" if thats a hint.
« Last Edit: February 21, 2016, 11:19:11 AM by Tonda »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Too many FSMs?
« Reply #12 on: February 21, 2016, 11:30:16 PM »
Hi Tonda, I've sent you a PM to join the beta group to see if the latest beta fixes your issue.

Also try disabling Draw PlayMaker Gizmos in Hierarchy in Preferences.

Tonda

  • Playmaker Newbie
  • *
  • Posts: 31
Re: Too many FSMs? [SOLVED]
« Reply #13 on: March 08, 2016, 01:57:55 AM »
SOLVED!

Replying here as I finally found a solution and want to help anyone googling this issue.

ONce again this was a massive slowdown in Unity Editor when doing anything related to Hierarchy - Project panes and to a lesser extent the Playmaker window as well. Even trying to rename a gameobject would cause a 10 second lag. I am on OSX.


After a week or so of trying various things I finally found a solution - Disabling ALL playmaker error checking.

hope this helps you if your googling this issue.