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
Process priority when application is minimized on dock or not focused #2822
I'm developing a CPU intensive application with electron and i'm experiencing some issue with process priority. We have a native module written in C doing signal processing (low level) and we broadcast live streaming over a socket. When application window is visible everything goes smooth but when is not focused (or worse minimized on dock) it looks like process is running at extremely low priority (native lib buffers are not able to be processed in real time). The strange fact is that this behaviour was introduced somewhere between electron 0.26.1 (firts version we used) and 0.31.1 (next version bump we adopted). Between these two version we have a leap of chromium from 42 to 44.
Anyone has any idea about this issue?
To be clear even in 0.26.1 i had experienced something similar but it wasn't so bad to compromise application functionality
I can confirm from source code that renderer process's priority has been lowered after the page is hidden, and luckily there is a --disable-renderer-backgrounding flag to disable that, can you have a try?
Activity
zcbenz commentedon Sep 18, 2015
Can you try preventing app suspension with power-save-blocker module?
lele85 commentedon Sep 18, 2015
Tried, sadly it doesn't solve the issue.
zcbenz commentedon Sep 18, 2015
Does it help if you set
page-visibilitytotrue?pracucci commentedon Sep 18, 2015
@zcbenz unfortunately setting
page-visibilitytotruedoesn't helpzcbenz commentedon Sep 18, 2015
I can confirm from source code that renderer process's priority has been lowered after the page is hidden, and luckily there is a
--disable-renderer-backgroundingflag to disable that, can you have a try?lele85 commentedon Sep 23, 2015
--disable-renderer-backgroundingseems to solve the issue. Thank you very much!