Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce GC allocations #40

Open
in0finite opened this issue Oct 6, 2019 · 0 comments
Open

Reduce GC allocations #40

in0finite opened this issue Oct 6, 2019 · 0 comments
Labels
improvement mobile Related to mobile platforms performance

Comments

@in0finite
Copy link
Owner

in0finite commented Oct 6, 2019

GC causes a lot of freezes in the mobile version.

Here are the screenshots of profiler showing what is allocating the memory (at commit 7725dfb):

Complete list
complete list
imGUI details
GUI details
behaviour update details
behaviour update details


As of version 3.2, GC is freezing the Android game on every 10 seconds, when running at 17 FPS in Demo scene.

As we can see, 7.9 KB out of 11.7 KB (67 %) is taken by imGUI. By converting imGUI to uGUI (see #52 for in-game UI) and using a single OnGUI() function, we can reduce 7.9 KB to only 0.4 KB.

This should be profiled again because #52 is done.

After #106 is done, there will be only a few usages of imGUI, so the most of GC allocations will be done by game logic. Also, this ticket will probably not be important anymore, so it can be closed at that moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement mobile Related to mobile platforms performance
Projects
None yet
Development

No branches or pull requests

1 participant