playMaker

Author Topic: The more FSMs in the scene, the longer it'll take to make a new one  (Read 1360 times)

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
This is more of a performance issue than a bug, but I'll report it anyway.

For this test I've taken it to the extreme by duplicating a object containing 7 FSMs each about a 1000 times in the scene. Each FSM have about 10 actions in them.

When I add a new FSM to any object, doesn't matter which, it takes a very long time for it to go through the process. It's as if it iterates through all existing FSMs in the scene for some reason (and potentially FSMs in prefabs?).

It's concerning for projects that are getting bigger in the long run, not so much for smaller ones. With a bit of logic it can be avoided, but would be great if things could improve here.

Video:
https://www.dropbox.com/s/pxzddcx2zcm6rvv/fsm-performance.mp4?dl=0

In the end of the video I deleted all the prefab objects in the scene, which resulted in adding FSMs much faster.

unity 2020.1.14f1
PM Beta 1.9.1p5

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: The more FSMs in the scene, the longer it'll take to make a new one
« Reply #1 on: March 19, 2021, 10:20:05 AM »
When was the last time you downloaded a 1.9.1p5 beta build? I updated the build in the last couple of days with some performance improvements, just wondering if you tested with that build or an older one (you can check the date against the date in the release notes).

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Re: The more FSMs in the scene, the longer it'll take to make a new one
« Reply #2 on: March 19, 2021, 01:41:28 PM »
Downloaded on March 15th, I'll re-download and test tomorrow!

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Re: The more FSMs in the scene, the longer it'll take to make a new one
« Reply #3 on: March 22, 2021, 07:14:32 AM »
Tested on the p5 build from 21st March, and adding new FSMs happens instantly now with no slow loading time! Fantastic :)

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: The more FSMs in the scene, the longer it'll take to make a new one
« Reply #4 on: March 22, 2021, 01:35:00 PM »
Great! Thanks for testing and reporting back :)

agelvik

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 46
Re: The more FSMs in the scene, the longer it'll take to make a new one
« Reply #5 on: March 24, 2021, 05:21:35 AM »
I'll post this here since it's very similar to the original issue with having a ton of FSMs in the scene.
I did some more testing by having multiple PM tabs active, and after narrowing it down it turns out these tabs are causing a big impact on performance individually, which are the following:

-FSM Browser
-Globals
-FSM Controls

Aside from these, adding FSMs happens instantly with no loading.

Video:
https://www.dropbox.com/s/5346pybrw45lww1/performanceissue_windows.mp4?dl=0

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: The more FSMs in the scene, the longer it'll take to make a new one
« Reply #6 on: March 24, 2021, 02:40:00 PM »
Thanks for the additional feedback. I'd like to get 1.9.1p5 out asap, but will investigate these for the next update.