question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UI Freezing on visual notifications

See original GitHub issue

I 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

freezing

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:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
Unthrottledcommented, Sep 17, 2020

Good Luck, Have Fun!

GLHF

1reaction
zaeraldcommented, Sep 17, 2020

Cool, I think this is a reasonable thing to fix before releasing v1.3 WDYT?

Yep, I’ll include it in v1.3 as this will improve the UX.

Is this something you wanted to work on or did you want to work together on this?

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio freezes and shows a busy notification while and ...
After some delay the Visual Studio busy notification appears. Fun fact: right clicking the busy notification related tray icon will show up a...
Read more >
UI freezes while notifications are being sent #5140 - GitHub
When a message comes in in Signal and notifications are turned on, the app's UI freezes for the duration of the notification signal...
Read more >
Visual Studio always hangs and freezes - Microsoft Q&A
I'm running Visual Studio Community 2019 on Windows 10 Home 20H2. ... freeze, and then I get a 'Visual Studio Delay Notification'.
Read more >
Visual Studio 2019 UI Freezes - SAP Community
If VS2019 UI freeze after opening a CR file, close the CR file A.S.A.P, do Clean Project + Rebuild Project by pressing Alt...
Read more >
Freezing UI Thread with AsyncTask - android - Stack Overflow
I'm trying to use an AsyncTask to download a file with a notification progress. Everything works fine (downloads in background thread), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found