Skip to content

Slow network performance when window is minimized #17402

Closed

Description

@logidelic
  • Electron Version: 4.1.0
  • Operating System: Ubuntu 18.04 (Same problem on both x64 & arm64)

Expected Behavior

Network performance remains stable regardless of app being minimized.

Actual Behavior

Network performance, via XMLHttpRequest, is highly degraded when app is minimized.

Additional Information

Just in case it's related, I am calling the following before anything else in my app:

app.commandLine.appendSwitch("disable-renderer-backgrounding");

Network performance is as expected until the app is minimized, at which point it is ~5x slower than normal. This isn't a recent regression. I have noticed the problem with my electron app for a long long time, but I hadn't made the connection with minimizing, so didn't realize what was causing it.

Activity

  1. MarshallOfSound commented on Mar 21, 2019

    @MarshallOfSound
    Member

    @logidelic Can you try the backgroundThrottling webPreferences option in your BrowserWIndow constructor and see how that affects things?

  2. added
    blocked/need-info ❌
    on Mar 21, 2019
  3. logidelic commented on Mar 21, 2019

    @logidelic
    Author

    @MarshallOfSound First of all, thank you for the suggestion:

    • The bad news is that adding backgroundThrottling:false to webPreferences did not help.

    • The good news is that adding app.commandLine.appendSwitch("disable-background-timer-throttling") did work!

    Thank you! I'm not going to close this issue yet, because I guess this indicates that:

    • The backgroundThrottling option is broken and should be fixed.

    • The documentation should be updated to mention that the throttling can affect network performance and not just timer accuracy.

  4. extracold1209 commented on Apr 2, 2019

    @extracold1209
    • Electron Version: 4.0.0
    • Operating System: Windows 10 x64 / macOS Mojave 10.14.4

    I have same issue.
    also

    app.commandLine.appendSwitch("disable-renderer-backgrounding");

    did work for me too.

  5. removed
    blocked/need-info ❌
    on May 1, 2019
  6. electron-triage commented on Feb 19, 2020

    @electron-triage

    Thank you for taking the time to report this issue and helping to make Electron better.

    The version of Electron you reported this on has been superseded by newer releases.

    If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.

    I'm setting the blocked/need-info label for the above reasons. This issue will be closed 7 days from now if there is no response.

    Thanks in advance! Your help is appreciated.

  7. added
    blocked/need-info ❌
    on Feb 19, 2020
  8. electron-triage commented on Feb 26, 2020

    @electron-triage

    Thank you for your issue!

    We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.

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

    4-2-xblocked/need-info ❌bug 🪲platform/linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions