Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: liero116 on September 07, 2014, 02:40:15 PM

Title: [SOLVED] Large FSM severely slow
Post by: liero116 on September 07, 2014, 02:40:15 PM
I have a rather large FSM on an object and editing or adding anything to the FSM is unbearably slow.  Something as simple as changing the value of a simple variable or moving a state from one point to another takes an absurd amount of time.  I'm looking at roughly 6-10 seconds just for a response.

I turned real time error checking off with little to no improvement.

Is there anything that can be done to speed things up?
Title: Re: Large FSM severely slow
Post by: jess84 on September 07, 2014, 02:43:17 PM
You're not editing a prefab whilst a scene containing that prefab is open, are you? Or an object that is linked to a prefab?
Title: Re: Large FSM severely slow
Post by: liero116 on September 07, 2014, 02:48:01 PM
I'm editing a prefab, yes, but it's an instance of it in a scene while the same scene is open.
Title: Re: Large FSM severely slow
Post by: Lane on September 07, 2014, 03:40:14 PM
If there are a large number of prefab instances in the scene it will be slow. Try editing the prefab in a blank scene to compare.

How big are you talking here? 50+ variables? Screenshot of the fsm maybe?

Title: Re: Large FSM severely slow
Post by: liero116 on September 07, 2014, 04:17:19 PM
Currently, I edit the prefab in a scene with around 20 other prefabs. 

Here's a shot of the FSM
(https://dl.dropboxusercontent.com/u/7806548/fsm.PNG)

I'm definitely using more than 50 variables.  It's got about 170.
Title: Re: Large FSM severely slow
Post by: jess84 on September 07, 2014, 04:30:10 PM
As Lane suggested, try just editing the FSM on the prefab in the project folder - while you have a blank scene open.  If you try and do it whilst an instance is in your scene, it'll be slow as it will update not only your prefab FSM but on the instance.
Title: Re: Large FSM severely slow
Post by: liero116 on September 07, 2014, 05:20:58 PM
As Lane suggested, try just editing the FSM on the prefab in the project folder - while you have a blank scene open.  If you try and do it whilst an instance is in your scene, it'll be slow as it will update not only your prefab FSM but on the instance.

If there are a large number of prefab instances in the scene it will be slow. Try editing the prefab in a blank scene to compare.

How big are you talking here? 50+ variables? Screenshot of the fsm maybe?



This does help quite a bit.  In my case, I don't actually have to go to an empty scene, but editing the prefab instead of the instance nearly fixes the issue.  There is still some delay, but it's considerably less than before.  Thanks guys!
Title: Re: [SOLVED] Large FSM severely slow
Post by: LoftyTheMetroid on October 16, 2014, 02:06:06 AM
Sorry to bump this, but our team has had a similar issue with Playmaker and prefabs.

The solution here seems to be that we should be editing prefabs themselves rather than instances of them.  However, doesn't that mean losing a huge advantage of prefabs? We often have many instances of a prefab, each with unique changes and values particular to that instance, but we want to maintain their prefab connections so that we can apply base changes across the game by editing the original prefab.

If the only way to overcome this issue is to restrict ourselves to editing prefabs themselves, then that would imply we either can't modify individual instances or we need to make a separate prefab out of each variant, losing vital connections to the original prefab in the process.

Am I misunderstanding the issue, or misusing FSMs on prefabs?  Is there a better or recommended means of accomplishing the same goals without heavy slowdown in the editor?

Thanks!
Title: Re: [SOLVED] Large FSM severely slow
Post by: Alex Chouls on October 28, 2014, 02:56:51 AM
Any chance you could send me a project that I could profile?
Title: Re: [SOLVED] Large FSM severely slow
Post by: LoftyTheMetroid on November 06, 2014, 03:18:32 PM
(Sorry for the delayed response, didn't see my question had gotten a reply...)

Any chance you could send me a project that I could profile?

Sure! I've sent you a PM with a link to a repro project.
Title: Re: [SOLVED] Large FSM severely slow
Post by: looi on October 10, 2018, 10:16:40 PM
I was suffering this problem and until now I've found the solution that gave me back the fluidity: in Preferences I've disabled the option "Enable Real Time Error Checker".

I've got like more than 200 playmaker "errors" and It seems the editor was looking on them every frame or something.

So anyone having this issue shoud try this. It definitely saved my productivity! :)
Title: Re: [SOLVED] Large FSM severely slow
Post by: miguelfanclub on October 11, 2018, 10:59:49 AM
It will also make you create more errors from now on since you wont see them.

I had to turn this option back again and fix everything in order to properly work again.
Title: Re: [SOLVED] Large FSM severely slow
Post by: Fat Pug Studio on October 11, 2018, 11:02:55 AM
Turn it off and turn it on once in a while to check for errors, fix them, then turn it back off again.
Title: Re: [SOLVED] Large FSM severely slow
Post by: Alex Chouls on December 29, 2018, 04:02:17 PM
There's also a Refresh button in the Error Check window toolbar to manually refresh the error list.

I've added some notes to the manual:
https://hutonggames.fogbugz.com/f/page?W156