Open bardcrab opened 4 years ago
Finally came to test this: Put the device on USB, connect with adb, start top command. In Trekarta, pan map, put Trekarta to background, while animation active. See Trekarta use 100% CPU in top.
Will try the fix. Hopefully soon. I use Trekarta in places, where the next electric outlet is hours of walk away. I have learned to have a power block ready.
I have tested app on RPi3 B+ board with Lineage OS 17.1 and found that app tends to continuously drain CPU with activity from single thread when switched to background. Issue appears only when I trying to switch the app to background and in the same time map animation (dragging easing for example) was not finished. Profiling shows that performance eating routines for this issue located mostly in CrosshairLayer.animate.Runnable.run method. I have tweaked it a bit and added check to prevent animation of execution if main activity is not running:
Issue was gone after this fix, but I not sure that this is right way to fix it, because I not digged in code too much.