Bug 253741 - Avoid including Document.h in DocumentParser and JSObject.h in JSSegmentedVariableObject.h
Summary: Avoid including Document.h in DocumentParser and JSObject.h in JSSegmentedVar...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-10 17:05 PST by Brent Fulgham
Modified: 2023-03-10 20:27 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2023-03-10 17:05:06 PST
The Document.h and JSObject.h headers are very costly. They are included in a few places where they are not used:

1. DocumentParser.h doesn't need to include the header, and already includes it in its implementation file.
2. JSSegmentedVariableObject.h doesn't use the contents of JSObject.h at all, so pays a heavy price for no benefit.

These two changes save about 4 minutes of CPU time parsing, and about 0.75 minutes of codegen.
Comment 1 Radar WebKit Bug Importer 2023-03-10 17:05:28 PST
<rdar://problem/106579489>
Comment 2 Brent Fulgham 2023-03-10 17:08:12 PST
Pull request: https://github.com/WebKit/WebKit/pull/11392
Comment 3 EWS 2023-03-10 20:27:06 PST
Committed 261538@main (f19ec43b3605): <https://commits.webkit.org/261538@main>

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