Title: [247362] trunk
Revision
247362
Author
[email protected]
Date
2019-07-11 14:04:05 -0700 (Thu, 11 Jul 2019)

Log Message

Unreviewed, rolling out r247314.
https://bugs.webkit.org/show_bug.cgi?id=199721

Caused performance regression. (Requested by deanj on
#webkit).

Reverted changeset:

"Disable speculative loading if cache is not to be used for
the load"
https://bugs.webkit.org/show_bug.cgi?id=199644
https://trac.webkit.org/changeset/247314

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (247361 => 247362)


--- trunk/LayoutTests/ChangeLog	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/LayoutTests/ChangeLog	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,3 +1,18 @@
+2019-07-11  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r247314.
+        https://bugs.webkit.org/show_bug.cgi?id=199721
+
+        Caused performance regression. (Requested by deanj on
+        #webkit).
+
+        Reverted changeset:
+
+        "Disable speculative loading if cache is not to be used for
+        the load"
+        https://bugs.webkit.org/show_bug.cgi?id=199644
+        https://trac.webkit.org/changeset/247314
+
 2019-07-11  Ryan Haddad  <[email protected]>
 
         Add test expectations and baselines for iOS 13

Deleted: trunk/LayoutTests/http/wpt/fetch/disable-speculative-for-reload-expected.txt (247361 => 247362)


--- trunk/LayoutTests/http/wpt/fetch/disable-speculative-for-reload-expected.txt	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/LayoutTests/http/wpt/fetch/disable-speculative-for-reload-expected.txt	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,3 +0,0 @@
-
-PASS Ensure image is not speculatively loaded after a reload 
-

Deleted: trunk/LayoutTests/http/wpt/fetch/disable-speculative-for-reload.html (247361 => 247362)


--- trunk/LayoutTests/http/wpt/fetch/disable-speculative-for-reload.html	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/LayoutTests/http/wpt/fetch/disable-speculative-for-reload.html	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,61 +0,0 @@
-<!doctype html>
-<script src=""
-<script src=""
-<script src=""
-<script>
-function loadIFrame(src) {
-    return new Promise(function(resolve, reject) {
-        var iframe = document.createElement('iframe');
-        iframe._onload_ = function() { resolve(iframe); };
-
-        iframe.src = ""
-
-        document.documentElement.appendChild(iframe);
-    });
-}
-
-async function imageLoadCount(uuid)
-{
-    const response = await fetch('resources/image-load.py?uuid=' + uuid, { method: 'POST' });
-    return response.text();
-}
-
-async function navigateIFrame(iframe, uuid)
-{
-    const promise = new Promise(resolve => iframe._onload_ = resolve);
-    iframe.src = "" + uuid;
-    await promise;
-    return imageLoadCount(uuid);
-}
-
-async function reloadIFrame(iframe, uuid)
-{
-    const promise = new Promise(resolve => iframe._onload_ = resolve);
-    iframe.contentWindow.location.reload();
-    await promise;
-    return imageLoadCount(uuid);
-}
-
-function resetIFrame(iframe)
-{
-    const promise = new Promise(resolve => { iframe._onload_ = resolve; });
-    iframe.src = ""
-    return promise;
-}
-
-promise_test(async (test) => {
-    const uuid = token();
-    const iframe = await loadIFrame("about:blank");
-
-    const token1 = await navigateIFrame(iframe, uuid);
-    await resetIFrame(iframe);
-    const token2 = await navigateIFrame(iframe, uuid);
-    const token3 = await reloadIFrame(iframe, uuid);
-
-    assert_equals(token1, "1", "navigating to");
-    assert_equals(token2, "2", "after new navigation");
-    assert_equals(token3, "3", "after reload");
-
-    iframe.remove();
-}, "Ensure image is not speculatively loaded after a reload");
-</script>

Deleted: trunk/LayoutTests/http/wpt/fetch/resources/iframe-with-image.py (247361 => 247362)


--- trunk/LayoutTests/http/wpt/fetch/resources/iframe-with-image.py	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/LayoutTests/http/wpt/fetch/resources/iframe-with-image.py	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,8 +0,0 @@
-ETAG = '"123abc"'
-
-
-def main(request, response):
-    test_id = request.GET.first("uuid")
-    response.status = (200, "OK")
-    response.headers.set("Content-Type", 'text/html')
-    return "<!doctype html><image src=''></image>"

Deleted: trunk/LayoutTests/http/wpt/fetch/resources/image-load-count.py (247361 => 247362)


--- trunk/LayoutTests/http/wpt/fetch/resources/image-load-count.py	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/LayoutTests/http/wpt/fetch/resources/image-load-count.py	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,11 +0,0 @@
-def main(request, response):
-    test_id = request.GET.first("uuid")
-    stashed_count = request.server.stash.take(test_id)
-    if stashed_count is None:
-        stashed_count = test_id + " none"
-
-    request.server.stash.put(test_id, stashed_count)
-
-    response.status = (200, "OK")
-    response.headers.set("Content-Type", 'text/plain')
-    return str(stashed_count)

Deleted: trunk/LayoutTests/http/wpt/fetch/resources/image-load.py (247361 => 247362)


--- trunk/LayoutTests/http/wpt/fetch/resources/image-load.py	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/LayoutTests/http/wpt/fetch/resources/image-load.py	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,36 +0,0 @@
-ETAG = '"123abc"'
-
-
-def main(request, response):
-    test_id = request.GET.first("uuid")
-
-    if request.method == "POST":
-        stashed_count = request.server.stash.take(test_id)
-        if stashed_count is None:
-            stashed_count = 0
-
-        request.server.stash.put(test_id, stashed_count)
-
-        response.status = (200, "OK")
-        response.headers.set("Content-Type", 'text/plain')
-        return str(stashed_count)
-
-    stashed_count = request.server.stash.take(test_id)
-    if stashed_count is not None:
-        stashed_count = stashed_count + 1
-    else:
-        stashed_count = 1
-    request.server.stash.put(test_id, stashed_count)
-
-    etag = request.headers.get("If-None-Match", None)
-    if etag == ETAG:
-        response.headers.set("X-HTTP-STATUS", 304)
-        response.status = (304, "Not Modified")
-        return ""
-
-    # cache miss, so respond with the actual content
-    response.status = (200, "OK")
-    response.headers.set("ETag", ETAG)
-    response.headers.set("Content-Type", 'image/png')
-    response.headers.set("Cache-Control", "max-age=0");
-    return 'myimagecontent'

Modified: trunk/Source/WebKit/ChangeLog (247361 => 247362)


--- trunk/Source/WebKit/ChangeLog	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/Source/WebKit/ChangeLog	2019-07-11 21:04:05 UTC (rev 247362)
@@ -1,3 +1,18 @@
+2019-07-11  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r247314.
+        https://bugs.webkit.org/show_bug.cgi?id=199721
+
+        Caused performance regression. (Requested by deanj on
+        #webkit).
+
+        Reverted changeset:
+
+        "Disable speculative loading if cache is not to be used for
+        the load"
+        https://bugs.webkit.org/show_bug.cgi?id=199644
+        https://trac.webkit.org/changeset/247314
+
 2019-07-11  Dean Jackson  <[email protected]>
 
         CrashTracer: Regression : MobileSafari at UIKit: -[CALayerAccessibility__UIKit__QuartzCore setBounds:]

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp (247361 => 247362)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp	2019-07-11 20:52:06 UTC (rev 247361)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp	2019-07-11 21:04:05 UTC (rev 247362)
@@ -270,29 +270,12 @@
 }
 
 #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION)
-static bool cachePolicyValidForSpeculativeRevalidation(WebCore::ResourceRequestCachePolicy policy)
-{
-    switch (policy) {
-    case WebCore::ResourceRequestCachePolicy::ReturnCacheDataElseLoad:
-    case WebCore::ResourceRequestCachePolicy::ReturnCacheDataDontLoad:
-    case WebCore::ResourceRequestCachePolicy::ReloadIgnoringCacheData:
-        return false;
-    case WebCore::ResourceRequestCachePolicy::UseProtocolCachePolicy:
-    case WebCore::ResourceRequestCachePolicy::RefreshAnyCacheData:
-        return true;
-    case WebCore::ResourceRequestCachePolicy::DoNotUseAnyCache:
-        ASSERT_NOT_REACHED();
-        return false;
-    }
-    return false;
-}
-
 static bool inline canRequestUseSpeculativeRevalidation(const ResourceRequest& request)
 {
     if (request.isConditional())
         return false;
 
-    if (cachePolicyValidForSpeculativeRevalidation(request.cachePolicy()))
+    if (cachePolicyAllowsExpired(request.cachePolicy()))
         return false;
 
     return request.requester() != ResourceRequest::Requester::XHR && request.requester() != ResourceRequest::Requester::Fetch;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to