Can someone please disable backgroundThrottling to prevent missed timers and notifications?
See original GitHub issueYour Environment
- Version used: 7.10.1 (but probably all versions)
- Operating System and version: Windows 10 Pro (20H2)
Expected Behavior
Get all notifications/sounds (idle, pomodoro, etc) in time.
Current Behavior
Randomly, timers go into negative values and don’t trigger notifications/sounds nor update the tray progress until you unminimize the window using the hotkey.
I think it might be because of backgroundThrottling
mentioned in this stackoverflow answer: https://stackoverflow.com/a/59610324/12781687
I can’t build the repo, so if someone could please add this to electron/main-window.ts
for the next build, it would be great.
mainWindow = new BrowserWindow({
...
webPreferences: {
...
backgroundThrottling: false,
},
});
From electron docs:
backgroundThrottling boolean (optional) - Whether to throttle animations and timers when the page becomes background. This also affects the Page Visibility API. Defaults to true.
Steps to Reproduce (for bugs)
- Can’t reproduce reliably, best chance is to let the timer run. And if you keep your ram full to 90% or so for a few minutes, you increase the chances of it staying unresponsive even after you no longer overload ram/cpu. (Kinda like chrome, so not sure this backgroundThrottling would totally fix it, but might help.)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
"backgroundThrottling: false" no longer affects ... - GitHub
Disabling background throttling should prevent the slowdowns/pausing of both animation frames and intervals/timeouts when the window is in ...
Read more >Latest iOS 16.2 Beta Lets You Disable Wallpaper and ...
Toggling off wallpaper will remove your wallpaper when you have always on display enabled, and toggling off notifications will prevent ...
Read more >FYI: how to disable timer throttling on Google Chrome - Reddit
go to chrome://flags/ yes, you can type that into URL bar. in the search, type "throttle". You're going to get 3 options, the...
Read more >Intent to Ship: Expensive Background Timer Throttling
Yes, I think this is true. Having worked to stop the circumvention of ad blockers for a while we see browser APIs abused...
Read more >BrowserWindow | Electron
If backgroundThrottling is disabled, the visibility state will remain visible even if the window is minimized, occluded, or hidden.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for opening this up! I’ll add this setting and it should be available for the next snap edge release (and for self compiled builds from the master branch). I hope there not to bad negative side effects (such as the increased resource usage), so feedback on this would be very welcome!
Yes, this issue should be closed. I couldn’t wait 4 months for the release, so what I realized is that I can use the installer version of super productivity and then I would be able to extract the .asar and modify it directly; and that’s what I did.
So I already tested it for a month or so and it solved the issue of missed timers. And didn’t introduce any issues. Anyway, thanks.