Repository navigation
Add backgroundThrottling option to webPreferences - #5086
Conversation
|
@zcbenz how does this compare to the power save blocker (https://github.com/electron/electron/blob/master/docs/api/power-save-blocker.md)? I am hunting down an issue in VS Code where people say that leaving it running over night causes out of memory crashes and I wonder if any of the two (throttling, app suspend) could have an impact. |
|
@bpasero The powerSaveBlocker prevents the system from suspending the app, while backgroundThrottling prevents Chromium throttling background pages. Their main purpose are to make the app always run at full power, they might be related to high CPU usages, but not to memory usage. The out of memory crash is usually caused by memory leaks. |
|
@zcbenz do we know more about what it means when an application gets suspended and when this would happen? is this something the OS would do and does not depend on using Chromium or not? We do have leaks, but many of our users complain about crashes when Code is running in the background and restoring it. The fact that background throttling changes timeouts and intervals might be causing unexpected behavior that you would not get when keeping the app running in foreground. |
|
The app suspension is platform depended and not related to Chromium, on OS X there is an App Nap feature to freeze the process so it doesn't run at all, on other platforms I think they usually make the program run slower by allocating less CPU resources for it. |
|
Ok thanks. |
Setting
backgroundThrottlingwill disable all throttling for background pages, close #4925.