Skip to content

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

Closed

Description

@lele85

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

Activity

  1. zcbenz commented on Sep 18, 2015

    @zcbenz
    Contributor

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

  2. lele85 commented on Sep 18, 2015

    @lele85
    Author

    Tried, sadly it doesn't solve the issue.

  3. zcbenz commented on Sep 18, 2015

    @zcbenz
    Contributor

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

  4. pracucci commented on Sep 18, 2015

    @pracucci

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

  5. zcbenz commented on Sep 18, 2015

    @zcbenz
    Contributor

    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?

  6. added
    blocked/need-info ❌
    and removed on Sep 21, 2015
  7. lele85 commented on Sep 23, 2015

    @lele85
    Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked/need-info ❌

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions