Bug 252045

Summary: Default Sheet Parsing can add delays before requesting main resource
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, beidson, cdumez, koivisto, nham, pvollan, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-02-10 04:10:38 PST
Hi Team,

It is just another potential optimisation done in Chrome which I came across and wanted to get input whether similar can be done in WebKit or not:

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/c0aa7538cb054f429822a3f3cc66efe826122b80

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/dom/Document.cpp#6387

___

In local testing, it compiles but had to use 'committedFirstRealDocumentLoad', which in case of Blink also got changed later in another commit (can't find it).

I haven't had any metrics to back up whether it works or not but again it is just for discussion on whether something can be done to get faster page loading or it is just placebo using this idea.

Keep making WebKit better.

Thanks!
Comment 1 Antti Koivisto 2023-02-15 04:27:38 PST
Process prewarming initializes the UA stylesheet among other things, see ProcessWarming::prewarmGlobally()
Comment 2 Ben Nham 2023-02-15 22:52:07 PST
I don't think this is a priority since we generally load pages into either a prewarmed WebProcess or an existing WebProcess, both of which will have their default stylesheet already parsed at the point of page load.
Comment 3 Radar WebKit Bug Importer 2023-02-17 04:11:16 PST
<rdar://problem/105592243>