playMaker

Author Topic: About Playmaker GC (Garbage Collection) and Allocation  (Read 4129 times)

gshape

  • Playmaker Newbie
  • *
  • Posts: 1
About Playmaker GC (Garbage Collection) and Allocation
« on: August 28, 2012, 05:09:51 AM »
Hi All,

I am developing a iOs game which performance is very important. I love PlayMaker and I developed my game majorly with PlayMaker. However, I found my game has some CPU spikes because of GC.Collect, and after doing some deep profiling, I found that PlayMaker contributes part of the GC alloc unfortunately.

I am wondering if anyone can help or suggest how to reduce or even eliminate those GC alloc by PlayMaker?
 :-[

I setup 2 demo scene to show the problem.
1st demo (demo1_b.jpg):

A capsule game object holds 2 FSMs with some states and variables (also global variables). It allocated 110.9 kb and 69.3 kb respectively. This looks okay right? However, my game contains many Game Objects that hold FSM(s) and this is definitely a panic when you see GC allocated is over 1 ~ 2 MegaBytes on a iPhone game.

2nd demo (demo2.jpg):
 
A capsule game object holds 1 FSM with only 1 state and 0 variables. It still allocated 13.7kb.



I can provide the copy of this demo scene to Alex. Hope this can help a bit.  :)

Thanks all!

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: About Playmaker GC (Garbage Collection) and Allocation
« Reply #1 on: April 24, 2014, 05:24:57 PM »
I keep banging into this - over and over.. and over..

What would be optimal to do? Skip frames calculations, avoid global variables, or use only Globals, what, what?

Naturally all the usual stuff with not adding to stings for ever etc - but it appears that PlayMaker itself is doing this as soon as there's a certain complexity to the setup..somehow.

I have rewritten my stuff so many times, but I keep banging into this.

FritsLyn

  • Full Member
  • ***
  • Posts: 191
Re: About Playmaker GC (Garbage Collection) and Allocation
« Reply #2 on: April 24, 2014, 05:42:32 PM »
Oh!
http://hutonggames.com/playmakerforum/index.php?topic=4863.0
Standalone player.. Oh!  Spikey gone-gone!
Oh!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: About Playmaker GC (Garbage Collection) and Allocation
« Reply #3 on: April 25, 2014, 08:18:56 AM »
Hi,

 can I mark this solve then? if yes, can you explain what was happening for future reference?

Bye,

 Jean