[webkit-changes] [WebKit/WebKit] 7914f5: Optimize layout of DocumentLoader to reduce padding
Simon Fraser
noreply at github.com
Mon Feb 6 13:57:01 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7914f5368fed6848fc6e0b4a2dee2b1a9e857829
https://github.com/WebKit/WebKit/commit/7914f5368fed6848fc6e0b4a2dee2b1a9e857829
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M Source/WebCore/loader/DocumentLoader.cpp
M Source/WebCore/loader/DocumentLoader.h
M Source/WebCore/loader/DocumentWriter.h
M Source/WebCore/loader/NavigationAction.cpp
M Source/WebCore/loader/NavigationAction.h
M Source/WebCore/workers/service/ServiceWorkerData.cpp
M Source/WebCore/workers/service/ServiceWorkerData.h
M Source/WebCore/workers/service/server/RegistrationDatabase.cpp
M Source/WebCore/workers/service/server/SWServerWorker.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKitLegacy/mac/WebView/WebDocumentLoaderMac.mm
Log Message:
-----------
Optimize layout of DocumentLoader to reduce padding
https://bugs.webkit.org/show_bug.cgi?id=251750
<rdar://problem/105049498>
Reviewed by Cameron McCormack.
DocumentLoader was 3824 bytes, including 378 bytes of padding. This shrinks it to 3728 bytes with 282 bytes
of padding. That doesn't save any memory; it's still allocated in a 4K block, but future reductions should
bring it down into a smaller size category. In particular, there seem to be multiple copies of WebCore::ResourceResponse
embedded in this class.
ServiceWorkerData, NavigationAction and DocumentWriter all had data members rearranged to reduce padding.
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::DocumentLoader):
* Source/WebCore/loader/DocumentLoader.h:
* Source/WebCore/loader/DocumentWriter.h:
* Source/WebCore/loader/NavigationAction.cpp:
(WebCore::NavigationAction::NavigationAction):
* Source/WebCore/loader/NavigationAction.h:
* Source/WebCore/workers/service/ServiceWorkerData.cpp:
(WebCore::ServiceWorkerData::isolatedCopy const):
(WebCore::ServiceWorkerData::isolatedCopy):
* Source/WebCore/workers/service/ServiceWorkerData.h:
(WebCore::ServiceWorkerData::decode):
* Source/WebCore/workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::importRecords):
* Source/WebCore/workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::SWServerWorker):
* Source/WebKitLegacy/mac/WebView/WebDocumentLoaderMac.mm:
(WebDocumentLoaderMac::setDataSource):
Canonical link: https://commits.webkit.org/259913@main
More information about the webkit-changes
mailing list