Bug 253681

Summary: Small build time improvement for WebPreferences
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Brent Fulgham 2023-03-09 16:43:41 PST
WebPreferences.h now includes <WebCore/LibWebRTCProvider.h> which is costly to parse, and this header is used in numerous places.

By adding a small helper function to WebPreferences that limits this header to the implementation file, it saves a few seconds of build time.

Current Sources:
**** Time summary:
Compilation (10190 times):
  Parsing (frontend):         8911.1 s
  Codegen & opts (backend):   3223.8 s

Proposed Change:
**** Time summary:
Compilation (10173 times):
  Parsing (frontend):         8902.7 s
  Codegen & opts (backend):   3203.7 s

This seems to save about 9 seconds of parsing time, and potentially 20 seconds of Codegen.
Comment 1 Radar WebKit Bug Importer 2023-03-09 16:44:32 PST
<rdar://problem/106527449>
Comment 2 Brent Fulgham 2023-03-09 17:11:25 PST
Pull request: https://github.com/WebKit/WebKit/pull/11338
Comment 3 EWS 2023-03-10 09:11:55 PST
Committed 261502@main (46fa174c8e6d): <https://commits.webkit.org/261502@main>

Reviewed commits have been landed. Closing PR #11338 and removing active labels.