Chrome 57+ Throttling

Discussion in 'Help & Guides' started by Kadauchi, Mar 15, 2017.

  1. Kadauchi

    Kadauchi Well-Known Member

    Messages:
    1,587
    Ratings:
    +2,289 / 6 / -0
    Chrome 57 has been released recently. This version introduces background tab throttling to help improve performance. This is important to know about for workers because many important scripts you use can be affected by this.

    Throttling of background tabs already existed, slowing them down to only be able to run once every second, but now they are going to be limited to an average of 1% CPU usage.

    Affected scripts

    Affected browsers
    • Chrome
    • Chrome Canary
    • Chromium
    • Opera (?)
    • Vivaldi (?)
    (?) denotes unconfirmed, but they are based off of chromium so they should be when their bases get updated to Chromium 57+


    How to opt-out

    Windows:
    1. Right click the shortcut you use to launch chrome and select properties.
    2. Add --disable-background-timer-throttling to the end of the target line, there needs to be a space separating it as pictured below.
    3. You will have to exit out of Chrome completely for this to take affect and always use the edited shortcut to launch chrome or the flag will not run.

    [​IMG]

    Mac:

    Enter this into the terminal
    Code:
    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome   --disable-background-timer-throttling
    
    You will have to do this everytime you launch Chrome or you can follow these instructions: https://turkerhub.com/posts/106128/

    Both:
    You can verify that the flag is enabled by going to chrome://version and seeing --disable-background-timer-throttling under "Command Line".

    How to know if a tab can to be throttled

    Any background tab that is not playing audio or does not have a WebSocket/WebRTC will be throttled unless you opt-out.

    HIT Finder would not be throttled since it is in the foreground
    [​IMG]

    HIT Finder would be throttled since it is in the background.
    [​IMG]

    Having the scripts in their own window will prevent them from being throttled as long as they aren't minimized. You can have other windows covering them, just do not minimize them to the system tray.
     
    • Useful / Informative Useful / Informative x 15
    • Love Love x 3
    • Like Like x 1
    Last edited: Mar 16, 2017
  2. Hazmat

    Hazmat Active Member

    Messages:
    461
    Ratings:
    +596 / 2 / -0
  3. jessers

    jessers Well-Known Member

    Messages:
    710
    Gender:
    Female
    Ratings:
    +1,898 / 1 / -6
    It seems like the way to do this on Mac is by pasting
    Code:
    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome   --disable-background-timer-throttling
    into Terminal.

    I think. It at least didn't break anything when I did it. So. Um. Yeah.

    I also don't know if you have to do this every time you launch Chrome. So. Um. Yeah.

    :oops: Hopefully someone smarter than I will figure it out. @RicanGuy86?


    Edit:

    Or is this also it?

    chrome://flags/#expensive-background-timer-throttling
    [​IMG]
     
    • Useful / Informative Useful / Informative x 3
    • Love Love x 1
    Last edited: Mar 15, 2017
  4. Kadauchi

    Kadauchi Well-Known Member

    Messages:
    1,587
    Ratings:
    +2,289 / 6 / -0
    If that gets confirmed to be working I'll add it to the main post for everyone else. That flag doesn't do anything, first thing I tested. Q2 2017 there should be an update that allows us to opt-out.
     
    • Like Like x 1
    • Useful / Informative Useful / Informative x 1
  5. RicanGuy86

    RicanGuy86 Well-Known Member

    Messages:
    2,020
    Ratings:
    +4,405 / 1 / -1
    The solution @jessers provided works.

    Verified by using the Chrome command chrome://verison.

    No flag:
    [​IMG]

    Flag enabled:
    [​IMG]

    The only thing is, Mac users will have to open Chrome using Terminal and specify the flag every single time they'd like to opt-out.
     
    • Useful / Informative Useful / Informative x 2
  6. Kadauchi

    Kadauchi Well-Known Member

    Messages:
    1,587
    Ratings:
    +2,289 / 6 / -0
    Thanks added the info to the orig post.
     
    • Like Like x 1
  7. RicanGuy86

    RicanGuy86 Well-Known Member

    Messages:
    2,020
    Ratings:
    +4,405 / 1 / -1
    Mac users can use a simple AppleScript to create an app that opens Chrome with the flag enabled.

    This is how:

    1. Navigate to Script Editor (Utilities > Script Editor)

    2. Copy this bit into Script Editor:
    Code:
    tell application "Terminal"
        do script "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome   --disable-background-timer-throttling"
    end tell
    3. Save the AppleScript as an application:

    [​IMG]

    This creates an app that a Mac user can double-click and open Chrome with the flag enabled.
     
    • Useful / Informative Useful / Informative x 3
    • Love Love x 1
    Last edited: Mar 16, 2017