3 ms·
I'm amazed no one's mentioned this yet. it's not just hardware acceleration that's the problem with Android. it's the garbage collection constantly running in t
by chugger 15y ago
I'm amazed no one's mentioned this yet. it's not just hardware acceleration that's the problem with Android. it's the garbage collection constantly running in the background that's causing some of the performance issues and lag. Now with ICS I read that it will allow the garbage collector to run on a different core from your application. that's definitely going to improve performance, but the overhead is still there. No wonder Android smartphones need 1.x GHZ and 1GB of RAM. Android needs it.
- chugger 15y agoanother note: iOS/Obj C does not do automatic garbage collection specifically for this reason (and battery life).
- nitrogen 15y agoNo wonder Android smartphones need 1.x GHZ and 1GB of RAM. Android needs it. The side effect of having all that extra CPU is that, when not running the core Android UI (e.g. a game written mostly in native code), a lot more power is available to developers.
- wbkang 15y agoIs 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...
- ZeroGravitas 15y agoThe Android devs mentioned this themselves in the very first comment on the bug about turning on GPU acceleration[1]. But the internet decided that GPU acceleration was the silver bullet, and now it's been turned on they're surprised that it's not. And this is somehow further evidence of Google's incompetence (and/or lack of taste) rather than just the obvious result of a bunch of engineering tradeoffs that, if you look at Android marketshare and Google's resultant influence on the future of the web, seem to have worked out quite well for them. [1] http://code.google.com/p/android/issues/detail?id=6914#c1 http://code.google.com/p/android/issues/detail?id=6914#c1
- chugger 15y agoWhat Google should've done is disable the garbage collector in Android/Dalvik the same way Apple did in iOS/Obj C. I don't know whether it's lack of foresight or incompetence on the part of Google, or maybe they were in a hurry to launch Android they didn't have time to re-architect the thing. Garbage collection exists in MAC OS X/Obj C btw.