Commit 2b398814 authored by Ben Kelly's avatar Ben Kelly Committed by Commit Bot

CacheStorage: Enable eager body reading by default.

Field trials show that this feature greatly improves body reading
performance at the cost of slightly slower following matches.  This
makes sense since the body reading is contending with the later match
operations.

Overall the data suggests this is a net win.  While we don't have a
metric that measures the entire lifecycle of a FetchEvent handled via
cache_storage, we can approximate it by adding the values from these
two UMAs together by percentile slice:

ServiceWorker.LoadTiming.Subresource.ResponseReceivedToCompleted2.CacheStorage
ServiceWorkerCache.Cache.Browser.Match.RelatedFetchEvent

Using this metric we see a 20% or greater progression in median time
to match+read a Response across all platforms.  In addition android saw
a 20% progression at P95.

Bug: 1010624
Change-Id: Id0a68727fe8dd49966988805135a1b03d46dea1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343592Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796104}
parent 3ddac091
...@@ -118,8 +118,8 @@ const base::Feature kCacheStorageParallelOps{"CacheStorageParallelOps", ...@@ -118,8 +118,8 @@ const base::Feature kCacheStorageParallelOps{"CacheStorageParallelOps",
// Enables eagerly reading the response body in cache.match() when the // Enables eagerly reading the response body in cache.match() when the
// operation was started from a FetchEvent handler with a matching request // operation was started from a FetchEvent handler with a matching request
// URL. // URL.
const base::Feature kCacheStorageEagerReading{ const base::Feature kCacheStorageEagerReading{"CacheStorageEagerReading",
"CacheStorageEagerReading", base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// If Canvas2D Image Chromium is allowed, this feature controls whether it is // If Canvas2D Image Chromium is allowed, this feature controls whether it is
// enabled. // enabled.
......
...@@ -602,7 +602,7 @@ ...@@ -602,7 +602,7 @@
{ {
"prefix": "cache-storage-eager-reading", "prefix": "cache-storage-eager-reading",
"bases": ["external/wpt/service-workers"], "bases": ["external/wpt/service-workers"],
"args": ["--enable-features=CacheStorageEagerReading"] "args": ["--disable-features=CacheStorageEagerReading"]
}, },
{ {
"prefix": "conditional-appcache-delay", "prefix": "conditional-appcache-delay",
......
This suite runs the ServiceWorker and CacheStorage tests with the This suite runs the ServiceWorker and CacheStorage tests with the
CacheStorageEagerReading feature enabled. This feature makes CacheStorageEagerReading feature disabled. This feature makes
CacheStorage immediately read response bodies when cache.match() CacheStorage immediately read response bodies when cache.match()
called within a FetchEvent handler. See crbug.com/1010624. called within a FetchEvent handler. See crbug.com/1010624.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment