bttv-android / bttv

A mod of the Twitch Android Mobile App adding BetterTTV, FrankerFaceZ and 7TV emotes
MIT License
644 stars 21 forks source link

Possible Memory Leak #203

Closed Jfamig closed 3 years ago

Jfamig commented 3 years ago

Bug Report

Current Behavior Using the app causes my phone to overheat.

Expected behavior/code Not overheat

Environment

Additional context/Screenshots It's inconsistent and doesn't happen all the time, but a "Device Care" popup flagged the BTTV app as the culprit of my phone overheating to the point where the screen brightness drops by 50% and the phone will no longer charge. I am no coder, but I know a memory leak when I see one.

welcome[bot] commented 3 years ago

Thank you for opening this issue ♥️ A maintainer should be by to give feedback soon. peepoArrive

FoseFx commented 3 years ago

As discussed in #152, this is not a memory leak. If you are experiencing degrading performance this is most likely due to your phone not being able to render a large amount of Gif Emotes.

Conclusion Clearly the increased CPU usage originates in the usage of (a lot) of Gif Emotes. This is expected, rendering these things is a non trivial task. This behavior does not get worse during runtime. I assume your CPU just starts overheating and thus throttles performance. This also explains why the reported times at which this behaviors starts differs wildly (4 hrs. vs 10 mins by other reports).

So what can be done? Very little. Twitch themselves have animated emotes, and yet they do not animated them (at least on my phone) because they are aware of the performance impact this can come with. If your device can't handle a chat room full of modChecks you should probably disable Gif Emotes in the BTTV settings. For next release #125 is in development, which would allow you to only render static versions of the emotes so you can at least have some of the BTTV experience.

chrisrnj commented 3 years ago

That is weird tho, they have an S20 and that's one of the best phones out there, if it's thermal throttling it's because something is using a lot of resources just to play gifs and shouldn't be