WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
253969
Stop including the expensive headers Document.h / LocalFrame.h in Page.h
https://bugs.webkit.org/show_bug.cgi?id=253969
Summary
Stop including the expensive headers Document.h / LocalFrame.h in Page.h
Brent Fulgham
Reported
2023-03-15 09:59:21 PDT
The 'Page.h' header is included in many places, and pulls in Document.h and LocalFrame.h, which are costly to parse. Instead, we should forward-declare these types and limit the includes to files that actually use the implementation details. Correct a layering violation introduced in
Bug 253293
that moved the implementation of Document::page() to the Page.h header by relocating that to the existing 'DocumentInlines.h'. This should retain the performance improvement without providing an implementation in an unrelated file. Similarly, move the inline implementation of Frame::page() that was moved into Page.h in
Bug 253204
to Frame.h. This patch adds the necessary includes that should have been added in Bugs 253293 and 253204 instead of adding the implementation in a header that happened to be commonly included.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-03-15 10:52:43 PDT
<
rdar://problem/106762759
>
Brent Fulgham
Comment 2
2023-03-15 12:13:58 PDT
Actually, after investigating this more, I think the changes in Bugs 253293 and 253204 are desirable and should be retained.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug