Title: [232275] trunk/Source/WebKit
- Revision
- 232275
- Author
- [email protected]
- Date
- 2018-05-29 15:14:03 -0700 (Tue, 29 May 2018)
Log Message
Store 0-lifetime stylesheets / scripts into the disk cache for faster history navigations
https://bugs.webkit.org/show_bug.cgi?id=186060
<rdar://problem/40627270>
Reviewed by Geoffrey Garen.
Tweak our storeUnconditionallyForHistoryNavigation logic to match resources whose priority
is High, not just VeryHigh. Per logic in CachedResource::defaultPriorityForResourceType(Type),
This now matches stylesheets and scripts in addition to main resources.
I found that in case of a history navigation to apple.com, a significant number of scripts
and stylesheets had to be loaded from the network because our previous heuristic decided
not to store them (because their priority was not VeryHigh and because their max-age was
0).
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (232274 => 232275)
--- trunk/Source/WebKit/ChangeLog 2018-05-29 21:29:57 UTC (rev 232274)
+++ trunk/Source/WebKit/ChangeLog 2018-05-29 22:14:03 UTC (rev 232275)
@@ -1,3 +1,23 @@
+2018-05-29 Chris Dumez <[email protected]>
+
+ Store 0-lifetime stylesheets / scripts into the disk cache for faster history navigations
+ https://bugs.webkit.org/show_bug.cgi?id=186060
+ <rdar://problem/40627270>
+
+ Reviewed by Geoffrey Garen.
+
+ Tweak our storeUnconditionallyForHistoryNavigation logic to match resources whose priority
+ is High, not just VeryHigh. Per logic in CachedResource::defaultPriorityForResourceType(Type),
+ This now matches stylesheets and scripts in addition to main resources.
+
+ I found that in case of a history navigation to apple.com, a significant number of scripts
+ and stylesheets had to be loaded from the network because our previous heuristic decided
+ not to store them (because their priority was not VeryHigh and because their max-age was
+ 0).
+
+ * NetworkProcess/cache/NetworkCache.cpp:
+ (WebKit::NetworkCache::makeStoreDecision):
+
2018-05-28 Jeff Miller <[email protected]>
Expose additional WKMenuItemIdentifier strings
Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp (232274 => 232275)
--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp 2018-05-29 21:29:57 UTC (rev 232274)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp 2018-05-29 22:14:03 UTC (rev 232275)
@@ -276,7 +276,7 @@
}
bool isMainResource = originalRequest.requester() == WebCore::ResourceRequest::Requester::Main;
- bool storeUnconditionallyForHistoryNavigation = isMainResource || originalRequest.priority() == WebCore::ResourceLoadPriority::VeryHigh;
+ bool storeUnconditionallyForHistoryNavigation = isMainResource || originalRequest.priority() >= WebCore::ResourceLoadPriority::High;
if (!storeUnconditionallyForHistoryNavigation) {
auto now = WallTime::now();
bool hasNonZeroLifetime = !response.cacheControlContainsNoCache() && WebCore::computeFreshnessLifetimeForHTTPFamily(response, now) > 0_ms;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes