Skip to content
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

Add chromium CLI flags to improve capture performance #90

Merged
merged 2 commits into from
Feb 15, 2018

Conversation

vbanos
Copy link

@vbanos vbanos commented Feb 13, 2018

--disable-background-timer-throttling and --disable-renderer-backgrounding:
karma JS test runner uses these to improve chrome performance
karma-runner/karma-chrome-launcher#123

--disable-hang-monitor: Suppresses hang monitor dialogs in renderer
processes. This may allow slow unload handlers on a page to prevent the
tab from closing, but the Task Manager can be used to terminate the
offending process in this case.

--mute-audio: obvious.

The following are part of google safe browsing features:
--disable-client-side-phishing-detection
--safebrowsing-disable-auto-update
--safebrowsing-disable-download-protection

Good reference with all chromium cli opts: https://peter.sh/experiments/chromium-command-line-switches/

``--disable-background-timer-throttling`` and ``--disable-renderer-backgrounding``:
karma JS test runner uses these to improve chrome performance
karma-runner/karma-chrome-launcher#123

``--disable-hang-monitor``: Suppresses hang monitor dialogs in renderer
processes. This may allow slow unload handlers on a page to prevent the
tab from closing, but the Task Manager can be used to terminate the
offending process in this case.

``--mute-audio``: obvious.

The following are part of google safe browsing features:
``--disable-client-side-phishing-detection``
``--safebrowsing-disable-auto-update``
``--safebrowsing-disable-download-protection``

Reference: https://peter.sh/experiments/chromium-command-line-switches/
@nlevitt
Copy link
Contributor

nlevitt commented Feb 14, 2018

--disable-background-timer-throttling and --disable-renderer-backgrounding
It's not at all clear to me what these options do. Also background timer throttling sounds like it could be something good for performance? Hard to say though without knowing more about it. That one is not mentioned on the link you pasted.

--mute-audio - sure, probably good for anyone running brozzler on their laptops.

--disable-hang-monitor - probably a good idea, not sure what would happen in brozzler if that dialog popped up, probably best to avoid it.

--disable-client-side-phishing-detection
--safebrowsing-disable-auto-update
--safebrowsing-disable-download-protection
Hmm interesting. We're liable to archive some malware if we do this. Which could be something we want to archive. But on the other hand, is probably something we want to protect wayback users from viewing. What is global wayback's approach/policy on malware?

Global Wayback policy is to archive everything, so its best to avoid
disabling these flags.
@vbanos
Copy link
Author

vbanos commented Feb 15, 2018

I'm sorry, info on all options I mentioned including the first two: --disable-renderer-backgrounding
--disable-background-timer-throttling is also in the Slack msg I wrote to you in the #brozzler channel.

--disable-renderer-backgrounding
Prevents Chromium from lowering the priority of invisible pages' renderer processes.
Its used in all the projects I saw running headless chrome, e.g. check out this here:
karma-runner/karma-chrome-launcher#123

--disable-background-timer-throttling
Disable task throttling of timer tasks from background pages.
https://peter.sh/experiments/chromium-command-line-switches/#disable-background-timer-throttling
This is also used extensively. E.g. https://github.com/N0taN3rd/Squidwarc/blob/master/lib/crawler/launcher.js#L27

Regarding the safebrowsing options, since Global Wayback policy is to archive everything,
its best to remove them. I already did that.

@nlevitt
Copy link
Contributor

nlevitt commented Feb 15, 2018

Thanks @vbanos. I saw the very brief descriptions that you quote in the docs but didn't understand what they meant. Thinking more about it, I can guess vaguely what they might mean and why they would improve performance. Viz, maybe chromium has optimizations to improve overall performance by de-prioritizing rendering of pages in windows that are not currently on screen. We want to disable these options because we want the browsers to run at full speed all the time. I'll merge your PR on the assumption that this interpretation is correct.

@nlevitt nlevitt merged commit 0d605d0 into internetarchive:master Feb 15, 2018
@vbanos vbanos deleted the chrome-flags-performance branch April 15, 2019 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants