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

Issue 3167020: Disk cache: Extend the internal buffering performed by each entry... (Closed)

Created:
10 years, 4 months ago by rvargas (doing something else)
Modified:
9 years, 6 months ago
CC:
chromium-reviews, pam+watch_chromium.org, John Grabowski, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Disk cache: Extend the internal buffering performed by each entry to cover external files. We now keep a variable-size buffer and use it even after we know that the data is not going to be stored by a block-file. The backend keeps track of the total memory used by all entries and prevents that value from going over a max value that depends on the total memory available. This CL removes the tests that were checking the synchronous operation of sparse IO because that model is no longer supported by the public API, and this CL would add complexity to them (they fail due to thread safety concerns). BUG=6626 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57082

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1079 lines, -543 lines) Patch
M net/disk_cache/backend_impl.h View 3 chunks +15 lines, -0 lines 0 comments Download
M net/disk_cache/backend_impl.cc View 3 chunks +35 lines, -0 lines 2 comments Download
M net/disk_cache/backend_unittest.cc View 1 13 chunks +112 lines, -51 lines 1 comment Download
M net/disk_cache/disk_cache_test_base.h View 2 chunks +14 lines, -0 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 2 chunks +33 lines, -0 lines 1 comment Download
M net/disk_cache/entry_impl.h View 3 chunks +18 lines, -6 lines 0 comments Download
M net/disk_cache/entry_impl.cc View 1 2 8 chunks +380 lines, -136 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 44 chunks +456 lines, -295 lines 0 comments Download
M net/disk_cache/file.h View 2 chunks +1 line, -5 lines 0 comments Download
M net/disk_cache/file_posix.cc View 1 6 chunks +10 lines, -23 lines 0 comments Download
M net/disk_cache/file_win.cc View 4 chunks +5 lines, -27 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
rvargas (doing something else)
10 years, 4 months ago (2010-08-17 23:09:08 UTC) #1
rvargas (doing something else)
I think the simplest thing is to start with entry_impl.cc... everything else is a consequence ...
10 years, 4 months ago (2010-08-17 23:21:19 UTC) #2
Paweł Hajdan Jr.
Drive-by with a test comment. No need to wait for another review by me. http://codereview.chromium.org/3167020/diff/1/4 ...
10 years, 4 months ago (2010-08-17 23:47:34 UTC) #3
gavinp
LGTM. http://codereview.chromium.org/3167020/diff/25001/26001 File net/disk_cache/backend_impl.cc (right): http://codereview.chromium.org/3167020/diff/25001/26001#newcode1893 net/disk_cache/backend_impl.cc:1893: total_memory = total_memory * 2 / 100; How ...
10 years, 4 months ago (2010-08-19 18:17:22 UTC) #4
rvargas (doing something else)
10 years, 4 months ago (2010-08-20 18:22:21 UTC) #5
Thanks.

The newlines are there, it's just rietveld / lint.

http://codereview.chromium.org/3167020/diff/25001/26001
File net/disk_cache/backend_impl.cc (right):

http://codereview.chromium.org/3167020/diff/25001/26001#newcode1893
net/disk_cache/backend_impl.cc:1893: total_memory = total_memory * 2 / 100;
On 2010/08/19 18:17:22, gavinp wrote:
> How did you arrive at 2%?

From nowhere?. That seems like a reasonable number, but there is no real reason.
That's the same number used for the incognito cache, but with a lower limit.

Powered by Google App Engine
This is Rietveld 408576698