playMaker

Author Topic: Significant GC.Collect Spikes  (Read 2423 times)

NateGallardo

  • Playmaker Newbie
  • *
  • Posts: 31
Significant GC.Collect Spikes
« on: September 10, 2016, 05:38:12 AM »
This bug is in reference to the issue discussed in this thread:
http://hutonggames.com/playmakerforum/index.php?topic=13464.0

In short, during runtime in the editor, frequent CPU spikes cause physics glitches, in turn causing issues such as the player passing through physics objects. This happens only in the editor as far as I can tell, not in builds.

Using the profiler, I identified two particular processes that appear to cause these spikes, and they are generally followed in the next frame by rigidbodies behaving unexpectedly, specifically, rigidbodies 'sleeping' or becoming disabled.

As discussed in the thread I linked, Playmaker Logging appeared to be one of the causes for these spikes. Disabling logging seemed to fix some problems at the time. However, I've since noticed that even with logging disabled, another Playmaker process is still causing huge GC.Collect spikes, resulting in the same issues.

There's a series of screenshots of the profiler here, they should be fairly self-explanatory: http://imgur.com/a/XMt4M

Jean, by the time you read this I will have emailed you a link to the project and a build. I'm open to the possibility that I may be doing something unwise in my FSMs. Do let me know if there's any other info I can provide :)






jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Significant GC.Collect Spikes
« Reply #1 on: September 13, 2016, 03:30:16 AM »
Hi,

 yes, Thanks a lot for this, I'll get back to you when I have something.

 Have a good day!

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Significant GC.Collect Spikes
« Reply #2 on: September 19, 2016, 03:24:58 AM »
Hi,

 ok, so the first thing that I would avoid is the use of SetProperty and GetProperty.

 When working with the new Unity UI, always prefer downloading the uGui proxy Full from the Ecosystem and if an action is missing to control an Ui Element or else, don't hesitate to ping me.


Bye,

 Jean