preload required content and parent process scripts at startup of GeckoView
Categories
(GeckoView :: General, defect, P3)
Tracking
(Performance Impact:medium)
Performance Impact | medium |
People
(Reporter: jesup, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: perf:pageload)
When Content (and master) processes start, there are a number of scripts that will be needed virtually always once we're load to load a URL or fixed content. If we can start their import/parsing/etc earlier, we'll be able to actually load a URL sooner (hopefully less delay from keyboard input or Intent/etc until we actually start the load). There's probably at leat 70ms, perhaps as high as 100ms, that could be saved here in some cases.
See for example https://perfht.ml/375JTIM , particularly the chromeUtils.imports
Comment 1•5 years ago
|
||
If we fix enough instances of 100 ms it can add up... Mike is P3 still correct here?
This would likely be owned by the platform folks: Eric, Andrew – can you prioritize this?
I will note that this case may not be covered by our current automation: it would fall under cold startup app link with browsertime but that test is currently running without browsertime.
Comment 3•4 years ago
|
||
Michael, you are correct that this case is generally not handled by browsertime automation since the browser conditioning would hide this delay.
But it would be something that users experience and that we'll one day capture in tests.
I think the qf priority tag is appropriate and I'm very interested in the feasibility of this making the 75 train. 70-100ms is a lot for a startup to a page load.
I have an open thread in Riot with mleclair to determine if the FNPRMS al
test will detect this case.
Comment 5•4 years ago
|
||
This is related to some of the perf work that :bdahl has already addressed in bug 1611820. We shall see if we can get this addressed in GV75.
Comment 6•4 years ago
|
||
I'm going to lower the priority of this one as it's a less common use case. Usually when fenix starts, a URL is immediately loaded without the users interaction because of app-link or there is a URL already loaded in the browser. In those cases eagerly loading the components does nothing to speed things up.
The results of some investigation I did with eagerly loading all the slow loading cu.imports in 'app-startup':
Benchmark 1:
- Load gv example
- Open new tab
- Enter url
- Time from url entered to DOMContentLoaded
Benchmark 2 (more common use case):
- Kill gv example
- Trigger app link
- Time from XRE_main to DOMContentLoaded
I ran all the above 15 times on a moto G5. Benchmark 1 showed 80-90ms improvement. Benchmark 2 showed no changes.
The bad thing about eagerly loading is we will need to play whack-a-mole and keep adding slows scripts to preload. I'm inclined to say we should focus the cold startup/app-link case (bug 16200790) and work overall on minimizing the imports time.
Reporter | ||
Comment 7•4 years ago
|
||
That would be bug 1620079
Comment 8•3 years ago
|
||
(In reply to Brendan Dahl [:bdahl] from comment #6)
I'm going to lower the priority of this one as it's a less common use case. Usually when fenix starts, a URL is immediately loaded without the users interaction because of app-link or there is a URL already loaded in the browser. In those cases eagerly loading the components does nothing to speed things up.
The results of some investigation I did with eagerly loading all the slow loading cu.imports in 'app-startup':
Benchmark 1:
- Load gv example
- Open new tab
- Enter url
- Time from url entered to DOMContentLoaded
Benchmark 2 (more common use case):
- Kill gv example
- Trigger app link
- Time from XRE_main to DOMContentLoaded
I ran all the above 15 times on a moto G5. Benchmark 1 showed 80-90ms improvement. Benchmark 2 showed no changes.
The bad thing about eagerly loading is we will need to play whack-a-mole and keep adding slows scripts to preload. I'm inclined to say we should focus the cold startup/app-link case (bug 16200790) and work overall on minimizing the imports time.
Lowering qf priority based on this comment.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•3 months ago
|
Updated•2 months ago
|
Description
•