3 ms·
Is there any evidence that suggest this? I have seen people saying this against desktop Java applications as well but mostly the unresponsiveness is caused by b
by wbkang 15y ago
Is there any evidence that suggest this? I have seen people saying this against desktop Java applications as well but mostly the unresponsiveness is caused by bad programming not GC. The GC process runs mostly in sub-milliseconds and you will never notice this.
- chugger 15y agoit's a widely known issues. If you allocate objects in a user interface loop, you will force a periodic garbage collection, creating little "hiccups" in the user experience. The concurrent collector introduced in Gingerbread helps, but unnecessary work should always be avoided. http://developer.android.com/guide/practices/design/performance.html http://developer.android.com/guide/practices/design/performa... Why should I avoid garbage collection? When Dalvik does a GC, most of the time your game will have to wait until the garbage collection is complete. It will often take in the order of 100 milliseconds to complete. Doesn’t sound like much but in your game loop this is huge – causing a horrible stutter or lack of responsiveness. http://fanitis.com/2011/02/09/android-game-performance-garbage-collection/ http://fanitis.com/2011/02/09/android-game-performance-garba... Garbage collection and async operations frequently block UI rendering. http://www.satine.org/archives/2011/01/01/the-care-and-feeding-of-the-android-gpu/ http://www.satine.org/archives/2011/01/01/the-care-and-feedi... Android Garbage Collector Slow Down http://stackoverflow.com/questions/6742314/android-garbage-collector-slow-down http://stackoverflow.com/questions/6742314/android-garbage-c... I'm performance tuning interactive games in Java for the Android platform. Once in a while there is a hiccup in drawing and interaction for garbage collection. Usually it's less than one tenth of a second, but sometimes it can be as large as 200ms on very slow devices. http://stackoverflow.com/questions/2484079/how-can-i-avoid-garbage-collection-delays-in-java-games-best-practices http://stackoverflow.com/questions/2484079/how-can-i-avoid-g...