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

Issue 841883002: Add an eviction mechanism for SDCH dictionaries. (Closed)

Created:
5 years, 11 months ago by Randy Smith (Not in Mondays)
Modified:
5 years, 11 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add an eviction mechanism for SDCH dictionaries. Implemented policy: * If space is needed for a newly loaded dictionary, evict any dictionaries that haven't been used in a day to make room, oldest first. * If the system signals memory pressure, flush all dictionaries. Also moved chrome_sdch_policy.* -> net/sdch/sdch_owner.*. BUG=387883 BUG=374916 Committed: https://crrev.com/a8a4e3c851d3e12ad27ac25493b6b690b867e39c Cr-Commit-Position: refs/heads/master@{#310584}

Patch Set 1 #

Patch Set 2 : git cl format #

Total comments: 9

Patch Set 3 : Incorporated comments. #

Total comments: 18

Patch Set 4 : Incorporated Alexei's comments. #

Patch Set 5 : Changes inspired by Alexei's comments. #

Patch Set 6 : Fix Windows/Android compile error from lack of std::string forward decl. #

Patch Set 7 : Sync'd to p310544 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1130 lines, -219 lines) Patch
D chrome/browser/net/chrome_sdch_policy.h View 1 chunk +0 lines, -45 lines 0 comments Download
D chrome/browser/net/chrome_sdch_policy.cc View 1 chunk +0 lines, -48 lines 0 comments Download
M chrome/browser/net/sdch_browsertest.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.h View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 3 4 5 6 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M net/base/sdch_manager.h View 1 2 6 chunks +17 lines, -6 lines 0 comments Download
M net/base/sdch_manager.cc View 1 2 8 chunks +25 lines, -31 lines 0 comments Download
M net/base/sdch_manager_unittest.cc View 1 2 3 4 6 chunks +68 lines, -42 lines 0 comments Download
M net/base/sdch_observer.h View 1 2 3 4 5 2 chunks +21 lines, -1 line 0 comments Download
M net/base/sdch_problem_code_list.h View 2 chunks +5 lines, -2 lines 0 comments Download
M net/filter/sdch_filter.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M net/filter/sdch_filter_unittest.cc View 1 2 3 13 chunks +81 lines, -30 lines 0 comments Download
M net/net.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
A net/sdch/sdch_owner.h View 1 2 3 1 chunk +97 lines, -0 lines 0 comments Download
A net/sdch/sdch_owner.cc View 1 2 1 chunk +265 lines, -0 lines 0 comments Download
A net/sdch/sdch_owner_unittest.cc View 1 2 3 4 1 chunk +491 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 4 chunks +39 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
Randy Smith (Not in Mondays)
Bence: Would you take a look? I may be making minor tweaks on my own ...
5 years, 11 months ago (2015-01-08 03:23:55 UTC) #3
Bence
https://codereview.chromium.org/841883002/diff/20001/net/base/sdch_manager.cc File net/base/sdch_manager.cc (right): https://codereview.chromium.org/841883002/diff/20001/net/base/sdch_manager.cc#newcode268 net/base/sdch_manager.cc:268: while (!dictionaries_.empty()) { What was wrong with dictionaries_.clear()? https://codereview.chromium.org/841883002/diff/20001/net/base/sdch_manager.h ...
5 years, 11 months ago (2015-01-08 14:37:17 UTC) #4
Randy Smith (Not in Mondays)
Comments incorporated. PTAL. Matt, Alexei: Given that Bence isn't calling out major areas for rewrite, ...
5 years, 11 months ago (2015-01-08 15:48:23 UTC) #7
Bence
LGTM. https://codereview.chromium.org/841883002/diff/20001/net/sdch/sdch_owner.cc File net/sdch/sdch_owner.cc (right): https://codereview.chromium.org/841883002/diff/20001/net/sdch/sdch_owner.cc#newcode134 net/sdch/sdch_owner.cc:134: DictionaryItem(const DictionaryItem& rhs) { On 2015/01/08 15:48:23, rdsmith ...
5 years, 11 months ago (2015-01-08 15:56:38 UTC) #8
Alexei Svitkine (slow)
histograms lgtm, but I found some C++ nits - also I didn't look very closely, ...
5 years, 11 months ago (2015-01-08 16:47:14 UTC) #9
mmenke
profiles/ LGTM
5 years, 11 months ago (2015-01-08 17:46:27 UTC) #10
Randy Smith (Not in Mondays)
I'm going to take a separate pass through and look for nits like the ones ...
5 years, 11 months ago (2015-01-08 18:00:12 UTC) #11
mmenke
You should fix the grammar in your description "Add an eviction mechanisms for SDCH dictionaries." ...
5 years, 11 months ago (2015-01-08 18:19:12 UTC) #12
Randy Smith (Not in Mondays)
On 2015/01/08 18:19:12, mmenke wrote: > You should fix the grammar in your description "Add ...
5 years, 11 months ago (2015-01-08 18:25:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/841883002/120001
5 years, 11 months ago (2015-01-08 19:16:38 UTC) #15
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 11 months ago (2015-01-08 20:18:47 UTC) #16
commit-bot: I haz the power
5 years, 11 months ago (2015-01-08 20:20:19 UTC) #17
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/a8a4e3c851d3e12ad27ac25493b6b690b867e39c
Cr-Commit-Position: refs/heads/master@{#310584}

Powered by Google App Engine
This is Rietveld 408576698