playMaker

Author Topic: [SOLVED] Large FSM severely slow  (Read 1819 times)

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
[SOLVED] Large FSM severely slow
« on: September 07, 2014, 11:40:15 AM »
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?
« Last Edit: September 07, 2014, 02:21:14 PM by liero116 »

jess84

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: Large FSM severely slow
« Reply #1 on: September 07, 2014, 11:43:17 AM »
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?

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Large FSM severely slow
« Reply #2 on: September 07, 2014, 11:48:01 AM »
I'm editing a prefab, yes, but it's an instance of it in a scene while the same scene is open.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Large FSM severely slow
« Reply #3 on: September 07, 2014, 12: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?


liero116

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Large FSM severely slow
« Reply #4 on: September 07, 2014, 01:17:19 PM »
Currently, I edit the prefab in a scene with around 20 other prefabs. 

Here's a shot of the FSM


I'm definitely using more than 50 variables.  It's got about 170.

jess84

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: Large FSM severely slow
« Reply #5 on: September 07, 2014, 01: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.

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Large FSM severely slow
« Reply #6 on: September 07, 2014, 02: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!

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: [SOLVED] Large FSM severely slow
« Reply #7 on: October 15, 2014, 11:06:06 PM »
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!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3317
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: [SOLVED] Large FSM severely slow
« Reply #8 on: October 27, 2014, 11:56:51 PM »
Any chance you could send me a project that I could profile?

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: [SOLVED] Large FSM severely slow
« Reply #9 on: November 06, 2014, 01: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.

looi

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: [SOLVED] Large FSM severely slow
« Reply #10 on: October 10, 2018, 07: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! :)

miguelfanclub

  • Full Member
  • ***
  • Posts: 108
    • View Profile
Re: [SOLVED] Large FSM severely slow
« Reply #11 on: October 11, 2018, 07: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.

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 789
    • View Profile
    • Fat Pug Studio
Re: [SOLVED] Large FSM severely slow
« Reply #12 on: October 11, 2018, 08: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.