Open CatalinTermure opened 4 years ago
Possibly a frame synchronisation issue, or possibly hitting your devices fill rate (looks to be somewhere between 4-6GPix/s, which likely shouldn't be the case with your ~2x fill rate).
Have you tried switching on multithreading to see if it helps? Also make sure you are not building as debug.
Can reproduce, but not to the same degree (draw thread is taking ~30ms in single-threaded and surprisingly even more - circa ~70ms on multi-threaded). Investigating.
It was a debug build, so that was why it was this bad. Building on release, I got similar results with ~70 ms on both single-threaded and multi-threaded.
One thing I can say for sure right now is that setting FrameStatisticsMode
to Full
carries a performance penalty in itself on mobile. Using Minimal
instead improves frame rate considerably (going from ~30fps with only the background showing to 60fps in single-threaded mode). I can also reproduce this in the framework sample game.
Enabling UI makes fps go down to ~16, however. Unsure what that is about but it might be just lack of optimisation.
Setting FrameStatisticsMode
to Minimal
was a solution, which is weird because I switched from Minimal
to Full
to make this report after the frames were this bad.
Regarding the UI, some parts of the UI were made specifically with lack of optimisation in mind, particularly the long notes because they are made with individual boxes, instead of a cut-off sprite. It's up to you to decide if the ~20 fps is acceptable for ~70 solid color boxes and ~20 sprites. If so, then feel free to close this issue.
Seeing that the lazer editor itself runs at ~15fps right now on my android device I'd say we might not be able to do better for now, although of course the goal is to improve on that result in the future.
Ok so this issue boils down to FrameStatisticsMode.Full
being close to unusable on android because of the extreme frame loss, as the rest is perfectly understandable.
Probably worth further investigation at some point. That overlay shouldn't really be reducing performance. Possibilities:
Issue: The draw fps of a very simple android app(only a background sprite and a box for darkening it) is constantly around 10-15.
Only code I have left uncommented is setting the window state to fullscreen, showing the full frame statistics and a method called on load, pasted below.
EDIT: To be noted, the app without any commented elements more UI elements was running at around 40 fps, until it randomly got to 15 even when removing most elements.
In this github repo you can see the full code: https://github.com/CatalinTermure/CytoidChartEditor
Frame Statistics:
Device used: Xiaomi Mi A1
Device specs: CPU – Octa-Core 2.0GHz ARM Cortex-A53 Chipset – Qualcomm Snapdragon 625 MSM8953 GPU – Qualcomm Adreno 506