playMaker

Author Topic: Inpspector Lag with large FSMs  (Read 4897 times)

bcottman

  • Playmaker Newbie
  • *
  • Posts: 8
Inpspector Lag with large FSMs
« on: January 14, 2017, 10:53:50 PM »
Hello,

I have just upgraded from Unity 5.1.1f1 / Playmaker 1.7.8.4 to Unity 5.5 / Playmaker 1.8.3. After importing and updating some of my playmaker assets I've noticed the unity inspector has significant lag when assets with a number of Large FSMs are selected. 

I've gone through and collapsed on the FSMs in the inspector, tried disabling all error checking, disabled undo/redo, and done my best to isolate individual FSMs that may be causing the slowdown but have had no luck...  Ive also begun going through and testing a number of other Unity versions to see where it may be introduced.  So far I am still finding the issue in 5.4, but updating from 5.1.1 to 5.1.5 is ok.     

Are there any known issues with Unity versions later than 5.1 that could be responsible for inspector issues? 

thanks

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Inpspector Lag with large FSMs
« Reply #1 on: January 15, 2017, 01:17:43 AM »
Try unchecking "Auto refresh action usage"
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

bcottman

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Inpspector Lag with large FSMs
« Reply #2 on: January 15, 2017, 02:23:55 AM »
thank you for the reply.
I did try this actually after seeing this as a response to a similar case and unfortunately it doesn't seem to remove the slow response in this case.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Inpspector Lag with large FSMs
« Reply #3 on: January 15, 2017, 03:00:57 PM »
Just out of curiosity, how many actions/states does that FSM has if it's causing slowdown? I'm using some big ones too, but i've never issues like that. You should maybe try a different approach to make them smaller or do it in code if they're making a big problem.
Available for Playmaker work

bcottman

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Inpspector Lag with large FSMs
« Reply #4 on: January 15, 2017, 08:22:43 PM »
I can replicate the inspector slow down by creating a new empty project and a single game object + FSM with a "wait"/finished state duplicated around 30+ times.

This is when using playmaker 1.8.3.

bcottman

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Inpspector Lag with large FSMs
« Reply #5 on: January 17, 2017, 09:54:20 PM »
curious if anyone else is able replicate this slowdown?

I have spent a few days trouble shooting but as it seems like this issue happens within a fresh project, and not only in my work, I'm not sure where to look apart from limiting the number of states per FSM in my workflow.

This isn't a tremendous slowdown, but I feel like it is enough to hinder speed of work and so I might simply stay with the older, 1.8.0 playmaker version to iterate faster.

any thoughts much appreciated.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Inpspector Lag with large FSMs
« Reply #6 on: January 17, 2017, 11:33:37 PM »
I've got some Fsm's in my current project with probably close to a hundred states in them- I've gotten used to a small loss in UI responsiveness when working with them- don't know if thats the slowdown you are referring too-

I try to avoid fsm's with tons of states now- instead I break them into a number of smaller fsm's that interact with each other using the Get/Set Fsm variable actions- and I try to use loops as much as possible when doing repetitive things- "array/Arraylist get next" actions-

Also I've noticed with Playmaker and other assets with their own interfaces that if you have the interface active when in play mode it slows everything down- so I make sure to deselect the fsm objects when in playmode- and only make the fsm visible/active when debugging-
« Last Edit: January 17, 2017, 11:35:22 PM by mdotstrange »
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

bcottman

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Inpspector Lag with large FSMs
« Reply #7 on: January 19, 2017, 07:46:20 PM »
yeah, the inspector slowdown can be worked around, but it has been enough to be continually frustrating.  I am seeing about a 1-5 second delay in scrolling the inspector.  It may be reasonable, however it stood out after upgrading as the same game object previously showed no delay in previous version.

I will investigate breaking up some of these FSMs into smaller components as a general practice. I was generally avoiding this as it becomes a bit more difficult to keep track of.
Also, i guess i am assessing if it makes sense to continue on in an older version just to get through the bulk of iteration I'm in the middle of.

Could you elaborate a bit on using loops with array/Arraylist?  I haven't used arrays or tried the add-on yet.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Inpspector Lag with large FSMs
« Reply #8 on: January 20, 2017, 01:25:38 AM »
Hi,
you can find some tutorials for array/arraylist and more here

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Inpspector Lag with large FSMs
« Reply #9 on: January 20, 2017, 03:22:28 AM »
Here's one I did on Playmaker arrays- I go over loops in it https://www.youtube.com/watch?v=yOZK8yr3IKo
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

marv

  • Junior Playmaker
  • **
  • Posts: 50
Re: Inpspector Lag with large FSMs
« Reply #10 on: January 20, 2017, 04:29:52 AM »
For breaking up FSMs it does help to decide on a naming scheme early on and stick to it. This way you know exactly where to look later when something doesn't work. I usually go with a "Process/Master" which is used to keep track of everything and name all further steps "Process/StepName".

If you then use the master to initiate each step and have each step loop back to the master on completion you have a way to keep track of everything pretty easily.

And, yea, I can only recommend you look into arraymaker, it makes so many things a lot easier (saving with easy save if you have a lot of variables that need to be saved/loaded as well).
« Last Edit: January 20, 2017, 04:31:57 AM by marv »