Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Issue 2385313002: Avoid MemoryCache eviction of preloaded resources with devtools open (Closed)

Created:
4 years, 2 months ago by Yoav Weiss
Modified:
4 years, 2 months ago
CC:
Nate Chapin, apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, gavinp+loader_chromium.org, kozyatinskiy+blink_chromium.org, loading-reviews+fetch_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid MemoryCache eviction of preloaded resources with devtools open Currently, InspectorNetworkAgent::didCommitLoad is evicting all resources from MemoryCache, including ones that were preloaded using headers just before that, which results in double downloads when devtools are open. This CL fixes that, by making sure that this eviction spares unused preloads. BUG=652187 Committed: https://crrev.com/f78da02239eef5039ce480e8620d30a136918a74 Cr-Commit-Position: refs/heads/master@{#424907}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Increased eviction efficiency #

Total comments: 1

Patch Set 3 : Added test #

Patch Set 4 : review comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -13 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads.php View 1 2 1 chunk +64 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads-expected.txt View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.cpp View 1 2 3 1 chunk +33 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 35 (23 generated)
Yoav Weiss
Hey Charlie, I finally decided to take the route you suggested and avoid evicting unused ...
4 years, 2 months ago (2016-10-03 21:15:16 UTC) #5
Charlie Harrison
https://codereview.chromium.org/2385313002/diff/1/third_party/WebKit/Source/core/fetch/MemoryCache.cpp File third_party/WebKit/Source/core/fetch/MemoryCache.cpp (right): https://codereview.chromium.org/2385313002/diff/1/third_party/WebKit/Source/core/fetch/MemoryCache.cpp#newcode639 third_party/WebKit/Source/core/fetch/MemoryCache.cpp:639: if (policy == EvictAllResources || !resourceIter->value->resource() || Optional nit: ...
4 years, 2 months ago (2016-10-03 21:48:21 UTC) #6
Yoav Weiss
On 2016/10/03 21:48:21, Charlie Harrison wrote: > https://codereview.chromium.org/2385313002/diff/1/third_party/WebKit/Source/core/fetch/MemoryCache.cpp > File third_party/WebKit/Source/core/fetch/MemoryCache.cpp (right): > > https://codereview.chromium.org/2385313002/diff/1/third_party/WebKit/Source/core/fetch/MemoryCache.cpp#newcode639 ...
4 years, 2 months ago (2016-10-04 08:15:20 UTC) #9
Charlie Harrison
On 2016/10/04 08:15:20, Yoav Weiss wrote: > On 2016/10/03 21:48:21, Charlie Harrison wrote: > > ...
4 years, 2 months ago (2016-10-04 12:48:30 UTC) #14
Yoav Weiss
On 2016/10/04 12:48:30, Charlie Harrison wrote: > On 2016/10/04 08:15:20, Yoav Weiss wrote: > > ...
4 years, 2 months ago (2016-10-07 09:58:04 UTC) #17
Yoav Weiss
friendly ping :)
4 years, 2 months ago (2016-10-10 20:56:25 UTC) #20
Charlie Harrison
Sorry, I thought I had reviewed this already. non-owner LGTM. https://codereview.chromium.org/2385313002/diff/20001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp File third_party/WebKit/Source/core/fetch/MemoryCache.cpp (right): https://codereview.chromium.org/2385313002/diff/20001/third_party/WebKit/Source/core/fetch/MemoryCache.cpp#newcode651 ...
4 years, 2 months ago (2016-10-10 21:00:21 UTC) #21
Yoav Weiss
Thanks Charlie! :) Nate - care to take a look?
4 years, 2 months ago (2016-10-11 07:58:42 UTC) #27
Nate Chapin
lgtm
4 years, 2 months ago (2016-10-12 22:26:42 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2385313002/60001
4 years, 2 months ago (2016-10-12 22:29:01 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-12 23:44:10 UTC) #33
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 23:47:05 UTC) #35
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f78da02239eef5039ce480e8620d30a136918a74
Cr-Commit-Position: refs/heads/master@{#424907}

Powered by Google App Engine
This is Rietveld 408576698