playMaker

Author Topic: Massive performance drop when viewing variables in run-time  (Read 14468 times)

balasco

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Massive performance drop when viewing variables in run-time
« Reply #15 on: June 25, 2012, 11:00:17 AM »
Hi,

 I don't think so.

how many globals do you have?

Bye,

 Jean

I have around 128 FSMs calling to each other with around four times that number of globals (and rising). I guess this is giving playmaker a pretty decent workout. Game runs fine though I should add, this isn't a run-time problem for me though, it's just become a general editor performance issue.

If this is what i think it is... then i may have a workaround.

i think it's linked to when playmaker is open on the screen... so, if i'm testing a rather hefty game system and have the editor window open, it slows down (since unity has to handle running the game AND running the PM windows.)

one way that i've managed to do a workaround is to put non-playmaker tabs in the windows... so, for the editor i have the native console as well... if it slows down, i switch it to that and that frees up some speed. same with globals... put the particle-effect window on that. i also have the action list share the same space with the inspector (this also helps when i'm testing variables becaus ei can tell them to be visible in the inspector so that i can see what's going on.)

not 100% sure this is what you're facing though... so, if you know your computer's system specs, that could help point you/us in the right direction.

My specific workaround was to make a 'dummy' scene with just the playmaker gui object and nothing else, that way I can add globals to that scene without any performance hit then return to my main scene to use them.

I'm running an Athlon II 64 x4 gaming rig, so I would't have thought specs would be an issue really. I really appreciate the help though guys, thank you.

Horror

  • Junior Playmaker
  • **
  • Posts: 79
Re: Massive performance drop when viewing variables in run-time
« Reply #16 on: June 27, 2012, 03:46:05 AM »
Well I am kind of glad this is an issue with playMaker and not something that I have done. My project is relatively light weight, so I was beginning to worry I had implemented something really bad into my project.

I'm not sure if this is a related issue, but even when the game isn't running, my Inspector window runs at snail pace when scrolled. The playMaker window itself does not do this, though. Weird.

Jernau

  • Playmaker Newbie
  • *
  • Posts: 19
Re: Massive performance drop when viewing variables in run-time
« Reply #17 on: June 27, 2012, 09:40:05 AM »
I'm also having some performance problems within the editor, but in my case it's unlikely to be related to global variables (I only have four).

As my project has grown I've noticed that it takes longer to launch the game within the editor, FSM editing has become slower, and the in-editor game FPS has also dropped significantly (the built version of the game still runs very smoothly). Where the performance problem has become most painful is when editing FSMs: connecting events to states, naming FSMs, renaming variables have all started to slow to a crawl (take more than a second to react to input). Renaming a global event takes more than a minute on my powerful Windows PC (and surprisingly only around thirty seconds on my less powerful MacBook Pro).

In fact, the overall editor performance is significantly worse on my Windows machine than on my MacBook Pro, even though my Windows PC has more powerful hardware. Though I should be clear that the performance is still uncomfortably slow on the MacBook Pro.

One potential issue that I've noticed is that old events that I've renamed are still remembered by playMaker. I changed my event naming scheme a while ago and mass re-named all of my events (around 100) from lower-case to upper-case (and starting using event categories with the "CATEGORY / EVENT" pattern). However, when I try to select a global event for a transition, the old lower-case events also appear in the list, even though they don't appear in the Global Events window.

I've turned off real-time error checking, but it doesn't seem to make a significant difference to editor performance. I haven't played with hiding the various playMaker editor windows, as others in this thread have suggested, I'll give that a go tonight.

The things that might be unusual with my project are: I make heavy use of Prefabs to generate my game (both game-board and game-pieces), and I don't use global variables - instead passing variables between FSMs using Send Event. I also favor FSMs with many small, well named, States that only have a few Actions each - rather than fewer States with more Actions in each.

Each of my game-tile Prefabs has four FSMs (and three more on it's child Trigger), but the full game-board has sixty-six game-tiles. Each of my game-pieces has around twenty FSMs (and perhaps ten more on their various child Triggers), and I have six game-pieces on the game-board. Perhaps playMaker is not designed to cope with that many FSMs running at the same time?

I have scaled down to a "development" game-board with just nineteen game-tiles (still with six game-pieces), but it didn't drastically improve editor performance.

Any ideas how I can increase performance? Do I need to rethink my FSM and State-heavy design approach?

Horror

  • Junior Playmaker
  • **
  • Posts: 79
Re: Massive performance drop when viewing variables in run-time
« Reply #18 on: June 27, 2012, 09:59:10 AM »
I've been adding a lot of extra variables and actions tonight (no extra FSMs) and it definitely feels like it's getting more sluggish than it was before. I'm generating a ragdoll at runtime, so this is requiring quite a few actions to setup.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Massive performance drop when viewing variables in run-time
« Reply #19 on: June 27, 2012, 10:29:36 AM »
I would love to get my hands on some of these projects that are slow in the editor. That will really help identify the problems. If you have a project that's slow in the editor and can share it, please email it to me with repro steps (things that are slow in the editor), and I'll investigate. Also file a bug report referencing the project so I can get your system info. Or just include system info in the email (playmaker version, unity version, hardware specs, build platform).

Thanks!
Alex

Jernau

  • Playmaker Newbie
  • *
  • Posts: 19
Re: Massive performance drop when viewing variables in run-time
« Reply #20 on: June 27, 2012, 10:43:44 AM »
I would love to get my hands on some of these projects that are slow in the editor. That will really help identify the problems.
That's great! I can zip-up my project and send it to you. Hopefully I'll have time to do it tonight (Central European Time), otherwise it'll be tomorrow.

Jernau

  • Playmaker Newbie
  • *
  • Posts: 19
Re: Massive performance drop when viewing variables in run-time
« Reply #21 on: June 29, 2012, 05:19:25 AM »
Alex, I sent you my project via e-mail yesterday, but I forgot to include my system info. I've just submitted a bug report from my MacBook Pro, so you should be able to see my OS X system info from that.

My Windows PC system info is:
playMaker 1.4.2
Unity 3.5.1f2
Intel i7 920 @ 3.5 GHz
6 GB RAM
AMD Radeon 4870

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Massive performance drop when viewing variables in run-time
« Reply #22 on: July 02, 2012, 06:44:56 PM »
Don't know if this is a factor in this case, but we recently figured out that if the Unity project is in Dropbox it really slows down editing in the Global Variables Window. Maybe there is some file locking fight between Dropbox and Unity when trying to access the PlayMakerGlobals.asset.

Is your project in Dropbox? Or maybe under version control?