| Summary: | Lazily compute SecurityOrigin::m_isPotentiallyTrustworthy for performance | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||
| Component: | WebCore Misc. | Assignee: | Chris Dumez <cdumez> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | achristensen, darin, ggaren, sam, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Chris Dumez
2021-06-11 16:22:24 PDT
Created attachment 431240 [details]
Patch
Comment on attachment 431240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=431240&action=review > Source/WebCore/page/SecurityOrigin.cpp:496 > + return m_isPotentiallyTrustworthy; return *m_isPotentiallyTrustworthy; > Source/WebCore/page/SecurityOrigin.h:246 > + std::optional<bool> m_isPotentiallyTrustworthy; This uses more memory. To offset this, could you make some of the surrounding booleans bit fields? (In reply to Alex Christensen from comment #2) > Comment on attachment 431240 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=431240&action=review > > > Source/WebCore/page/SecurityOrigin.cpp:496 > > + return m_isPotentiallyTrustworthy; > > return *m_isPotentiallyTrustworthy; Indeed, oops. > > > Source/WebCore/page/SecurityOrigin.h:246 > > + std::optional<bool> m_isPotentiallyTrustworthy; > > This uses more memory. To offset this, could you make some of the > surrounding booleans bit fields? sizeof(SecurityOrigin) is 64 before and after my change so let's not? Created attachment 431242 [details]
Patch
Created attachment 431243 [details]
Patch
Created attachment 431245 [details]
Patch
Committed r278806 (238763@main): <https://commits.webkit.org/238763@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431245 [details]. |