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

Issue 374873002: Service Worker: Delay stale resource cleanup (Closed)

Created:
6 years, 5 months ago by falken
Modified:
6 years, 5 months ago
Reviewers:
michaeln, nhiroki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Service Worker: Delay stale resource cleanup Before this patch, we eagerly cleaned up purgeable resources when the ServiceWorkerStorage object is initialized, which could result in an IO flurry at browser startup. This patch: - Cleans up uncommitted resources (not just purgeable resources) left over from the last browser session - Performs that cleanup lazily, when a mutation of the purgeable or uncommitted resources is about to occur BUG=388095 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282035

Patch Set 1 #

Patch Set 2 : style #

Patch Set 3 : style #

Total comments: 10

Patch Set 4 : review comments #

Patch Set 5 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -32 lines) Patch
M content/browser/service_worker/service_worker_database.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database_unittest.cc View 3 chunks +32 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_script_cache_map.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 1 2 3 5 chunks +16 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 3 11 chunks +73 lines, -18 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 4 chunks +38 lines, -10 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
falken
PTAL
6 years, 5 months ago (2014-07-08 12:24:24 UTC) #1
michaeln
lgtm https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc#newcode976 content/browser/service_worker/service_worker_database.cc:976: BumpNextResourceIdIfNeeded(ids, batch); lions and tigers and bears, thnx ...
6 years, 5 months ago (2014-07-09 02:36:11 UTC) #2
nhiroki
lgtm https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc#newcode976 content/browser/service_worker/service_worker_database.cc:976: BumpNextResourceIdIfNeeded(ids, batch); Great catch! Thank you :) https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc#newcode1063 ...
6 years, 5 months ago (2014-07-09 03:43:10 UTC) #3
falken
Thanks for the reviews. https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc File content/browser/service_worker/service_worker_database.cc (right): https://codereview.chromium.org/374873002/diff/40001/content/browser/service_worker/service_worker_database.cc#newcode1063 content/browser/service_worker/service_worker_database.cc:1063: for (std::set<int64>::const_iterator itr = used_ids.begin(); ...
6 years, 5 months ago (2014-07-09 04:31:14 UTC) #4
falken
The CQ bit was checked by falken@chromium.org
6 years, 5 months ago (2014-07-09 04:33:35 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/374873002/60001
6 years, 5 months ago (2014-07-09 04:37:01 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 5 months ago (2014-07-09 05:25:52 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-09 05:27:59 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_dbg_simulator/builds/168554) ios_rel_device_ninja on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_rel_device_ninja/builds/27083) mac_chromium_compile_dbg ...
6 years, 5 months ago (2014-07-09 05:28:00 UTC) #9
falken
The CQ bit was unchecked by falken@chromium.org
6 years, 5 months ago (2014-07-09 05:28:58 UTC) #10
falken
The CQ bit was checked by falken@chromium.org
6 years, 5 months ago (2014-07-09 05:29:25 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/374873002/80001
6 years, 5 months ago (2014-07-09 05:30:39 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-09 11:03:08 UTC) #13
commit-bot: I haz the power
6 years, 5 months ago (2014-07-09 14:39:34 UTC) #14
Message was sent while issue was closed.
Change committed as 282035

Powered by Google App Engine
This is Rietveld 408576698