How should I account for the GC when building games with Unity?
Posted
by
Eonil
on Game Development
See other posts from Game Development
or by Eonil
Published on 2012-03-12T12:28:27Z
Indexed on
2012/03/20
23:40 UTC
Read the original article
Hit count: 273
unity
|Performance
*As far as I know, Unity3D for iOS is based on the Mono runtime and Mono has only generational mark & sweep GC.
This GC system can't avoid GC time which stops game system. Instance pooling can reduce this but not completely, because we can't control instantiation happens in the CLR's base class library. Those hidden small and frequent instances will raise un-deterministic GC time eventually. Forcing complete GC periodically will degrade performance greatly (can Mono force complete GC, actually?)
So, how can I avoid this GC time when using Unity3D without huge performance degrade?
© Game Development or respective owner