Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2a94489953daa8763856526f77e12dcaa77a2fe7
https://github.com/WebKit/WebKit/commit/2a94489953daa8763856526f77e12dcaa77a2fe7
Author: Patrick Griffis <[email protected]>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M
LayoutTests/platform/glib/imported/w3c/web-platform-tests/resource-timing/decoded-body-size-compressed.https-expected.txt
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCache.h
M Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.h
M Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp
M Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.h
Log Message:
-----------
Add in-memory cache for compression dictionaries
https://bugs.webkit.org/show_bug.cgi?id=324671
Reviewed by Alex Christensen.
Finding the best match read records from the cache I/O queue, so
startNetworkLoad() had to wait, and a newly registered dictionary could not
be matched until its write landed.
Keep an in-memory index instead, filled when the cache is opened and updated
when a dictionary is stored, so matching is synchronous. Entries hold only the
key, hash, id and parsed URLPattern; bodies stay on disk and are read only
when a dcb or dcz response needs one.
The index is kept consistent with storage:
- The startup scan skips records whose key was replaced, removed or cleared
while it ran.
- Deleting website data also takes the indexed keys, which its traversal
cannot see yet, but spares dictionaries registered after it began.
- Matching skips keys the storage record filter rules out, so evicted
dictionaries are not advertised.
- A partial clear drops only newer entries, and expired entries are pruned.
* LayoutTests/platform/glib/TestExpectations:
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/resource-timing/decoded-body-size-compressed.https-expected.txt:
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::deleteCacheRecordsForOrigin):
* Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::Cache):
(WebKit::NetworkCache::Cache::storeCompressionDictionary):
(WebKit::NetworkCache::Cache::isBetterCompressionDictionaryMatch):
(WebKit::NetworkCache::Cache::addToCompressionDictionaryIndex):
(WebKit::NetworkCache::Cache::removeFromCompressionDictionaryIndex):
(WebKit::NetworkCache::Cache::compressionDictionaryKeys const):
(WebKit::NetworkCache::Cache::populateCompressionDictionaryIndex):
(WebKit::NetworkCache::Cache::bestCompressionDictionaryMatch):
(WebKit::NetworkCache::Cache::retrieveCompressionDictionary):
(WebKit::NetworkCache::Cache::remove):
(WebKit::NetworkCache::Cache::clear):
(WebKit::NetworkCache::isBetterCompressionDictionaryMatch): Deleted.
(WebKit::NetworkCache::Cache::retrieveCompressionDictionaryBestMatch): Deleted.
* Source/WebKit/NetworkProcess/cache/NetworkCache.h:
* Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.h: Make mayContain()
public.
* Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
(WebKit::NetworkDataTaskSoup::continueCreateRequestForRedirection): Deleted.
* Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.h:
Canonical link: https://commits.webkit.org/322222@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications