Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can someone please disable backgroundThrottling to prevent missed timers and notifications? #2028

Closed
RationalFragile opened this issue Apr 24, 2022 · 5 comments

Comments

@RationalFragile
Copy link

Your 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)

  1. 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.)
@github-actions
Copy link

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

@github-actions
Copy link

Hello there RationalFragile! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

For more open ended discussions and/or specific questions, please visit the discussions page. 💖

@johannesjo
Copy link
Owner

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!

@github-actions
Copy link

This issue has not received any updates in 90 days. Please comment, if this still relevant!

@github-actions github-actions bot added the Stale label Aug 27, 2022
@RationalFragile
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants