ADB
ADB

Reputation: 2329

Android: performance increase of the app after 15s-120s. Why?

I have a bit of a problem with a game I am working on. The game runs very well on most devices, except Samsung Tab and Galaxy S (it could be more, but I have reports about those two).

What happens on those devices is that the app appear extremely sluggish for 15s-120s then speeds up dramatically (from 5fs to 30fps, which is the normal performance elsewhere). This seems to happen only when the game is installed (or reinstalled).

What could cause that problem?

Any help is welcome.

Upvotes: 4

Views: 1201

Answers (1)

Michael
Michael

Reputation: 1496

You could try to call dalvik.system.VMRuntime.getRuntime().setMinimumHeapSize() early in your app with about the size of the heap while your game runs. This will allocate the target heap size at once and avoid reallocs.

I know it is deprecated but who cares if it helps.

Upvotes: 3

Related Questions