Android: increase application performance after 15s-120. What for?

I have a little problem with the game I'm working on. The game works very well on most devices except the Samsung Tab and Galaxy S (it could be more, but I have reports on these two).

What happens on these devices is that the application looks extremely sluggish for 15 s-120, and then increases dramatically (from 5 to 30 frames per second, which is normal performance elsewhere). This only happens when the game is installed (or reinstalled).

What can cause this problem?

  • In the first run, we create a couple of files on the SD card to save the settings, but I doubt that this can have a lasting effect?
  • JIT is climbing to hit? But it works great on another platform with and without JIT. Immediately by disabling JIT, it seems that the slowdown will last longer on the Tab, so there may be an effect.
  • Could it be that the device is trying to reorder objects laid out in memory? The game takes up a lot of memory space.
  • Is there a known issue with Samsung devices? (This seems to be a problem only for them)

Any help is appreciated.

+4
source share
1 answer

You can try calling dalvik.system.VMRuntime.getRuntime().setMinimumHeapSize() at the beginning of your application with heap size during the game. This will immediately highlight the size of the target heap and avoid reuse.

I know that it is outdated, but who cares if it helps.

+3
source

Source: https://habr.com/ru/post/1334941/


All Articles