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

Issue 2114933002: cachetool: Implement batch mode to speed-up cache processing. (Closed)

Created:
4 years, 5 months ago by gabadie
Modified:
4 years, 5 months ago
Reviewers:
pasko, gavinp
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cachetool: Implement batch mode to speed-up cache processing. Before, Sandwich was modifying local cache directories by issuing cachetool commands sequentially. But it was painfully slow. This CL implement the cachetool's batch mode that process sequence of command received from the stdin and return the commands results in the stdout. This way, Sandwich just have to launch cachetool once in the background and push to its stdin commands to process. On cache directories populated by big webpages such as cnn.com's home page, the Sandwich cache processing for NoState-Prefetch emulation was taking 491s when spawning one cachetool process for each commands versus 3s with this new online mode. BUG=582080 Committed: https://crrev.com/fbe837c8513395e7f304999eaaf67c4cbfb77eea Cr-Commit-Position: refs/heads/master@{#405157}

Patch Set 1 #

Total comments: 27

Patch Set 2 : Addresses egor comments #

Patch Set 3 : s/CachetoolIOBase/CommandParser #

Patch Set 4 : Addressing egor's comments #

Patch Set 5 : Rebase #

Patch Set 6 : Fixes comments #

Patch Set 7 : s/CommandParser/CommandMarshal/g #

Unified diffs Side-by-side diffs Delta from patch set Stats (+362 lines, -140 lines) Patch
M net/tools/cachetool/cachetool.cc View 1 2 3 4 5 6 6 chunks +362 lines, -140 lines 0 comments Download

Messages

Total messages: 28 (15 generated)
gabadie
Hey Gavin, slight refactor of cachetool to speed up cache processing. PTAL.
4 years, 5 months ago (2016-07-01 11:12:13 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2114933002/1
4 years, 5 months ago (2016-07-01 11:43:25 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-01 12:15:18 UTC) #7
pasko
https://codereview.chromium.org/2114933002/diff/1/net/tools/cachetool/cachetool.cc File net/tools/cachetool/cachetool.cc (right): https://codereview.chromium.org/2114933002/diff/1/net/tools/cachetool/cachetool.cc#newcode28 net/tools/cachetool/cachetool.cc:28: const int kResponseInfoIndex = 0; constexpr is preferred now ...
4 years, 5 months ago (2016-07-05 15:13:31 UTC) #9
gabadie
Thanks Egor. One other idea I just had was to rename "online" command to "batch". ...
4 years, 5 months ago (2016-07-06 09:25:54 UTC) #10
pasko
yeah, 'batch' is good with me, thank you https://codereview.chromium.org/2114933002/diff/1/net/tools/cachetool/cachetool.cc File net/tools/cachetool/cachetool.cc (right): https://codereview.chromium.org/2114933002/diff/1/net/tools/cachetool/cachetool.cc#newcode31 net/tools/cachetool/cachetool.cc:31: "stop", ...
4 years, 5 months ago (2016-07-06 15:18:55 UTC) #11
gabadie
Thanks Egor! Let's wait for Gavin's review. https://codereview.chromium.org/2114933002/diff/1/net/tools/cachetool/cachetool.cc File net/tools/cachetool/cachetool.cc (right): https://codereview.chromium.org/2114933002/diff/1/net/tools/cachetool/cachetool.cc#newcode37 net/tools/cachetool/cachetool.cc:37: std::cout << ...
4 years, 5 months ago (2016-07-06 16:45:32 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2114933002/60001
4 years, 5 months ago (2016-07-06 17:08:28 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-06 18:12:14 UTC) #17
gavinp
lgtm lgtm
4 years, 5 months ago (2016-07-13 14:48:42 UTC) #23
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/2114933002/120001
4 years, 5 months ago (2016-07-13 14:49:04 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 5 months ago (2016-07-13 15:29:50 UTC) #26
commit-bot: I haz the power
4 years, 5 months ago (2016-07-13 15:31:21 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/fbe837c8513395e7f304999eaaf67c4cbfb77eea
Cr-Commit-Position: refs/heads/master@{#405157}

Powered by Google App Engine
This is Rietveld 408576698