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

Process priority when application is minimized on dock or not focused #2822

Closed
lele85 opened this Issue Sep 17, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@lele85

lele85 commented Sep 17, 2015

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

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Sep 18, 2015

Can you try preventing app suspension with power-save-blocker module?

@lele85

This comment has been minimized.

lele85 commented Sep 18, 2015

Tried, sadly it doesn't solve the issue.

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Sep 18, 2015

Does it help if you set page-visibility to true?

@pracucci

This comment has been minimized.

pracucci commented Sep 18, 2015

@zcbenz unfortunately setting page-visibility to true doesn't help

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented 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-backgrounding flag to disable that, can you have a try?

@lele85

This comment has been minimized.

lele85 commented Sep 23, 2015

--disable-renderer-backgrounding seems to solve the issue. Thank you very much!

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