UI Freezing on visual notifications
See original GitHub issueI noticed this when I test the different events of the plugin and sometimes the platform is freezing, the culprit is the response time of retrieving the assets. We should bundle at least 3 visual notifications that the plugin can fallback into whenever the asset retrieval takes a while, this can also help if the user is in offline mode.
The idea is, we need to request download assets if it returns fast enough, use it, else use the fallback. Fallback order whenever it takes a while to download: If the download takes a while -> use the already downloaded assets or use the bundled assets.
IDK yet on how we can enable us to continue downloading the assets if we immediately return the cached–downloaded or bundled–assets. (I’m still not good with threads 😭)
So I have a pretty decent internet speed (~40mbps
). Maybe it’s about the CloudFront server host that sometimes it takes a while to retrieve the assets.
Demo
I had a rough and naive benchmark on my end, the visual notification duration would look like:
Text 1ms
Visual 2,648ms
Audible 1,154ms
Visual execution duration is 3,842ms
Logs
Experienced the freezing twice.2020-09-18 04:41:31,423 [ 24135] WARN - .diagnostic.PerformanceWatcher - UI was frozen for 6490ms...
2020-09-18 04:41:53,217 [ 45929] WARN - .diagnostic.PerformanceWatcher - UI was frozen for 7528ms...
2020-09-18 04:41:26,382 [ 19094] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/greetings/greeting_4.gif
2020-09-18 04:41:31,423 [ 24135] WARN - .diagnostic.PerformanceWatcher - UI was frozen for 6490ms, details saved to ...
2020-09-18 04:41:38,323 [ 31035] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/text/celebration.json
2020-09-18 04:41:39,369 [ 32081] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/dance_crew.gif
2020-09-18 04:41:41,472 [ 34184] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/audible/celebration/waoow.mp3
2020-09-18 04:41:45,691 [ 38403] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/text/happy.json
2020-09-18 04:41:46,876 [ 39588] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/happy/happy_five.gif
2020-09-18 04:41:50,769 [ 43481] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/audible/celebration/tuturuu_mayushi_desu.wav
2020-09-18 04:41:53,217 [ 45929] WARN - .diagnostic.PerformanceWatcher - UI was frozen for 7528ms, details saved to ...
2020-09-18 04:42:06,081 [ 58793] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/happy/happy_one.gif
2020-09-18 04:42:18,902 [ 71614] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/text/smug.json
2020-09-18 04:42:19,939 [ 72651] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/smug/smug_reaction_1.gif
2020-09-18 04:42:21,386 [ 74098] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/audible/celebration/sugoi_sugoi.wav
2020-09-18 04:42:26,034 [ 78746] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/smug/smugumin_1.gif
2020-09-18 04:42:28,590 [ 81302] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/audible/celebration/padoru_padoru.wav
2020-09-18 04:42:33,907 [ 86619] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/visuals/celebration/tohru_approval.gif
2020-09-18 04:42:35,289 [ 88001] WARN - tor.plugin.assets.AssetManager - Attempting to download asset https://waifu.assets.unthrottled.io/audible/celebration/nice_nice_nice_nice.wav
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
Good Luck, Have Fun!
Yep, I’ll include it in
v1.3
as this will improve the UX.I want to work on this, but I may do it badly lol. So I’ll work on it first tomorrow early morning then if I managed to do it and if you have free time you can review it and if there are more things that needed to be changed, let’s work on it together.
I plan to finish it tomorrow and hope that we can release it on Sunday.