playMaker

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

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
[SOLVED] Large FSM severely slow
« 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?
« Last Edit: September 07, 2014, 05:21:14 PM by liero116 »

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Large FSM severely slow
« Reply #1 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?

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Large FSM severely slow
« Reply #2 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.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Large FSM severely slow
« Reply #3 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?

Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Large FSM severely slow
« Reply #4 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


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

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: Large FSM severely slow
« Reply #5 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.

liero116

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Large FSM severely slow
« Reply #6 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!

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
Re: [SOLVED] Large FSM severely slow
« Reply #7 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!

Alex Chouls

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

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
Re: [SOLVED] Large FSM severely slow
« Reply #9 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.

looi

  • Playmaker Newbie
  • *
  • Posts: 21
Re: [SOLVED] Large FSM severely slow
« Reply #10 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! :)

miguelfanclub

  • Full Member
  • ***
  • Posts: 165
Re: [SOLVED] Large FSM severely slow
« Reply #11 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.

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: [SOLVED] Large FSM severely slow
« Reply #12 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.
Available for Playmaker work

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: [SOLVED] Large FSM severely slow
« Reply #13 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