You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
disable-renderer-backgrounding command line switch not working #4317
But as soon as I minimize the app or just background it (by bringing another app in front) I can tell it is immediately throttled which causes all kinds of problems in my app.
In my situation I have a multi-window app, but as per #3225 (comment) I believe I'm doing it correctly.
My original comment can be wrong since I didn't test it, the safest choice is to put it before the ready event of app. For per window you can take the WebAudio hack.
@zcbenz: I can confirm that this is broken, so I'm going to reopen the issue. I've created a test case repository that demonstrates animation frames taking multiple seconds to fire even when using the --disable-renderer-backgrounding flag and the web audio hack.
Here's where this comes up in Atom. Here's two test suite windows that were started at the same time, except one was hidden and therefore throttled:
More importantly, this is causing problems on CI such as this one.
It would be great if we could find some way to make sure pages don't get throttled. If I'm doing something wrong in my example, please let me know.
@nathansobo It is actually another issue, disable-renderer-backgrounding did prevent lowering the priority of renderer process, however for background pages Chromium has another throttling system for animations, I'll try to find a way to disable it.
@nathansobo I tried to patch a few places related to throttling but none of them works for animations, so filing an issue would probably be the only choice.
Activity
zcbenz commentedon Feb 2, 2016
My original comment can be wrong since I didn't test it, the safest choice is to put it before the ready event of
app. For per window you can take the WebAudio hack.brian-mann commentedon Feb 2, 2016
I am putting it before the
readyevent.I will try the audio hack as well.
brian-mann commentedon Feb 2, 2016
I implemented:
And I still see my process being backgrounded both in Chrome 48 and in Electron
0.36.7.I can tell it is being backgrounded because I'm using Promises everywhere and they go from taking
0.004 seceach turn of the run loop up to1 sec.zcbenz commentedon Feb 2, 2016
@brian-mann Can you make a test case for it? It is probably caused by other things since
disable-renderer-backgroundingdid work for other people.brian-mann commentedon Feb 4, 2016
I'll see about getting this together. I agree - need to reduce the case.
nathansobo commentedon Mar 2, 2016
@zcbenz: I can confirm that this is broken, so I'm going to reopen the issue. I've created a test case repository that demonstrates animation frames taking multiple seconds to fire even when using the
--disable-renderer-backgroundingflag and the web audio hack.Here's where this comes up in Atom. Here's two test suite windows that were started at the same time, except one was hidden and therefore throttled:
More importantly, this is causing problems on CI such as this one.
It would be great if we could find some way to make sure pages don't get throttled. If I'm doing something wrong in my example, please let me know.
zcbenz commentedon Mar 5, 2016
@nathansobo It is actually another issue,
disable-renderer-backgroundingdid prevent lowering the priority of renderer process, however for background pages Chromium has another throttling system for animations, I'll try to find a way to disable it.nathansobo commentedon Mar 9, 2016
@zcbenz should we file an issue with the Chrome team about adding another flag? Is something you could maybe hack in?
zcbenz commentedon Mar 9, 2016
@nathansobo I tried to patch a few places related to throttling but none of them works for animations, so filing an issue would probably be the only choice.
zcbenz commentedon Mar 27, 2016
I have created #4925 for the
requestAnimationFramethrottling problem, closing this issue now.