Bug 180929 - REGRESSION (r225789): 35% regression in cold time-to-first-load by enabling service workers
Summary: REGRESSION (r225789): 35% regression in cold time-to-first-load by enabling s...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-18 03:01 PST by Tim Horton
Modified: 2017-12-19 09:24 PST (History)
10 users (show)

See Also:


Attachments
test app (32.04 KB, application/zip)
2017-12-18 03:01 PST, Tim Horton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2017-12-18 03:01:08 PST
Created attachment 329646 [details]
test app

Steps to Reproduce:

1. Run the attached test app.
2. Revert r225789.
3. Run the attached test app again.

Expected: Relatively similar results.
Actual: GlobalCold Navigation Time goes up by 35% (for me, ~330ms -> ~450ms)

This measures the time it takes to load about:blank in the first WKWebView in a given UI Process. Other metrics (subsequent views, etc.) don't similarly go up, so this has to be a fixed one-time cost of some sort. I haven't looked at traces yet.
Comment 1 Tim Horton 2017-12-18 03:03:12 PST
> Other metrics (subsequent views, etc.) don't similarly go up, so this has to be a fixed one-time cost of some sort.

Actually, not true, they just go up by much less (5-10%)
Comment 2 Radar WebKit Bug Importer 2017-12-18 11:32:35 PST
<rdar://problem/36111525>
Comment 3 Chris Dumez 2017-12-18 14:25:14 PST
Could be due to the fact that we have to wait for the SW database to be read from disk before we can serve the first load.
Comment 4 Chris Dumez 2017-12-18 14:35:39 PST
(In reply to Chris Dumez from comment #3)
> Could be due to the fact that we have to wait for the SW database to be read
> from disk before we can serve the first load.

(and reading the SW database also requires the StorageProcess to be launched.
Comment 5 youenn fablet 2017-12-18 14:39:38 PST
We can probably easily optimize the case of non HTTP/HTTPS main pages.
We know about:blank will never get intercepted.
Comment 6 youenn fablet 2017-12-19 09:24:17 PST
(In reply to youenn fablet from comment #5)
> We can probably easily optimize the case of non HTTP/HTTPS main pages.
> We know about:blank will never get intercepted.

Filed https://bugs.webkit.org/show_bug.cgi?id=180976 for that purpose.