Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Don't start pageload right after profiler is started #53

Open
sefeng211 opened this issue Dec 13, 2019 · 1 comment
Open

Don't start pageload right after profiler is started #53

sefeng211 opened this issue Dec 13, 2019 · 1 comment

Comments

@sefeng211
Copy link
Member

This is a profile I collected by using browsertime: https://perfht.ml/346daRd
The problem is there's no gap between the empty buffer and the page starts to load.

I'd suggest we wait a second after this line

await runner.runPrivilegedScript(script, 'Start GeckoProfiler');

@ncalexan
Copy link
Member

ncalexan commented Jan 3, 2020

This is a profile I collected by using browsertime: https://perfht.ml/346daRd
The problem is there's no gap between the empty buffer and the page starts to load.

Why is a gap necessary? Is starting the Gecko profiler not synchronous, meaning that after starting (via privileged JS, say) we still need to wait for it to be ready?

I'd suggest we wait a second after this line

await runner.runPrivilegedScript(script, 'Start GeckoProfiler');

Is there some event that tells us the profiler is ready? 1s seems arbitrary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants