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

Disable throttling in test windows via WebAudio hack #9485

Merged
merged 1 commit into from Nov 7, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+6 −0
Diff settings

Always

Just for now

@@ -57,6 +57,12 @@ module.exports = ({blobStore}) ->

document.title = "Spec Suite"

# Avoid throttling of test window by playing silence
context = new AudioContext()
source = context.createBufferSource()
source.connect(context.destination)
source.start(0)

testRunner = require(testRunnerPath)

This comment has been minimized.

Copy link
@francoislaberge

francoislaberge Feb 14, 2016

@nathansobo Any idea if this trick works as far back as 0.29.2? We're having odd throttling behavior (networking and cpu) currently but can't upgrade our Electron because we're having build issues for our ARM environment.

We're working on getting unblocked on upgrading, but in the meantime any techniques to disable all throttling behavior in chromium is desired. Related, any advice on making Chrome only perform at maximum would be helpful. We are adding our own resource throttling at a higher level in our custom linux build.

This comment has been minimized.

Copy link
@nathansobo

nathansobo Feb 15, 2016

Author Contributor

There was a page-visibility option that stopped working, requiring this. I referenced it at electron/electron#3225. Not sure when that was introduced though.

This comment has been minimized.

Copy link
@nathansobo

nathansobo Mar 1, 2016

Author Contributor

I should note that as of Chrome 47, the visibility doesn't appear to be working to keep our tests running in the foreground. A new --disable-background-timer-throttling flag was added in Chrome 49, but that's still in beta.

This comment has been minimized.

Copy link
@zcbenz

zcbenz Mar 6, 2016

Member

@nathansobo disable-background-timer-throttling only disables throttling for timers, for requestAnimationFrame it doesn't work. I tried lots of ways but still can not find the correct way to make requestAnimationFrame work for background pages, we probably need help from Chrome developers.

This comment has been minimized.

Copy link
@nathansobo

nathansobo Mar 8, 2016

Author Contributor

So the original flag to disable background rendering doesn't work anymore?

This comment has been minimized.

Copy link
@zcbenz

zcbenz Mar 10, 2016

Member

It is still working for timers like setInterval, but not for requestAnimationFrame.

legacyTestRunner = require(legacyTestRunnerPath)
buildDefaultApplicationDelegate = -> new ApplicationDelegate()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.