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

Issue 23983005: SimpleCache: merge the first and second stream in one file (Closed)

Created:
7 years, 3 months ago by clamy
Modified:
7 years, 3 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

SimpleCache: merge the first and second stream in one file This CL merges the two first streams in a single file in order to reduce the disk space consumption of the Simple Cache. BUG=173398 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223989

Patch Set 1 : #

Total comments: 27

Patch Set 2 : Switched to GrowableIOBuffer #

Total comments: 31

Patch Set 3 : Stream 0 size in footer #

Total comments: 32

Patch Set 4 : Removed functions from simple_util #

Total comments: 52

Patch Set 5 : Changes in the crc32 handling #

Total comments: 16

Patch Set 6 : Addressed Egor's comments #

Patch Set 7 : Addressed gavin's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+635 lines, -246 lines) Patch
M net/disk_cache/backend_unittest.cc View 1 2 3 4 3 chunks +5 lines, -6 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 1 2 3 4 5 33 chunks +119 lines, -45 lines 0 comments Download
M net/disk_cache/simple/simple_entry_format.h View 1 2 3 4 5 6 3 chunks +14 lines, -6 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.h View 1 2 3 4 5 7 chunks +38 lines, -8 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.cc View 1 2 3 4 5 6 19 chunks +135 lines, -47 lines 0 comments Download
M net/disk_cache/simple/simple_index_file.cc View 1 2 3 4 2 chunks +1 line, -5 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.h View 1 2 3 4 5 6 6 chunks +57 lines, -12 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.cc View 1 2 3 4 5 6 15 chunks +249 lines, -99 lines 0 comments Download
M net/disk_cache/simple/simple_test_util.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/disk_cache/simple/simple_util.h View 1 2 3 4 2 chunks +7 lines, -8 lines 0 comments Download
M net/disk_cache/simple/simple_util.cc View 1 2 3 2 chunks +9 lines, -9 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
clamy
gavinp, pasko: PTAL This is a first version of the stream merge. Concerning tests, there ...
7 years, 3 months ago (2013-09-05 14:30:28 UTC) #1
pasko
Sorry, I am reading this slowly. As usual, I find it difficult to jump across ...
7 years, 3 months ago (2013-09-09 20:01:22 UTC) #2
clamy
Thanks Egor! It's true that the interactions between SimpleEntryImplementation and SimpleSynchronousEntry are not always easy ...
7 years, 3 months ago (2013-09-10 14:35:59 UTC) #3
gavinp
Overall looks good. I like keeping the buffer in the simple_entry_impl, makes for nice zero ...
7 years, 3 months ago (2013-09-10 22:20:49 UTC) #4
clamy
https://chromiumcodereview.appspot.com/23983005/diff/20001/net/disk_cache/simple/simple_entry_format.h File net/disk_cache/simple/simple_entry_format.h (right): https://chromiumcodereview.appspot.com/23983005/diff/20001/net/disk_cache/simple/simple_entry_format.h#newcode49 net/disk_cache/simple/simple_entry_format.h:49: uint32 stream_0_size; On 2013/09/10 22:20:49, gavinp wrote: > I'm ...
7 years, 3 months ago (2013-09-11 12:46:20 UTC) #5
gavinp
https://chromiumcodereview.appspot.com/23983005/diff/20001/net/disk_cache/simple/simple_entry_format.h File net/disk_cache/simple/simple_entry_format.h (right): https://chromiumcodereview.appspot.com/23983005/diff/20001/net/disk_cache/simple/simple_entry_format.h#newcode49 net/disk_cache/simple/simple_entry_format.h:49: uint32 stream_0_size; On 2013/09/11 12:46:21, clamy wrote: > On ...
7 years, 3 months ago (2013-09-11 14:22:10 UTC) #6
Deprecated (see juliatuttle)
https://chromiumcodereview.appspot.com/23983005/diff/7001/net/disk_cache/simple/simple_entry_format.h File net/disk_cache/simple/simple_entry_format.h (right): https://chromiumcodereview.appspot.com/23983005/diff/7001/net/disk_cache/simple/simple_entry_format.h#newcode47 net/disk_cache/simple/simple_entry_format.h:47: uint32 stream_0_size; Why not just store the offset of ...
7 years, 3 months ago (2013-09-12 22:05:56 UTC) #7
pasko
https://codereview.chromium.org/23983005/diff/20001/net/disk_cache/backend_unittest.cc File net/disk_cache/backend_unittest.cc (right): https://codereview.chromium.org/23983005/diff/20001/net/disk_cache/backend_unittest.cc#newcode3191 net/disk_cache/backend_unittest.cc:3191: // Write an invalid header on stream 1. Let's ...
7 years, 3 months ago (2013-09-13 19:09:21 UTC) #8
clamy
Thanks for the review guys! This new version has the size of stream 0 stored ...
7 years, 3 months ago (2013-09-16 15:01:17 UTC) #9
Deprecated (see juliatuttle)
https://chromiumcodereview.appspot.com/23983005/diff/37001/net/disk_cache/simple/simple_entry_impl.h File net/disk_cache/simple/simple_entry_impl.h (left): https://chromiumcodereview.appspot.com/23983005/diff/37001/net/disk_cache/simple/simple_entry_impl.h#oldcode289 net/disk_cache/simple/simple_entry_impl.h:289: // If |have_written_[index]| is true, we have written to ...
7 years, 3 months ago (2013-09-16 20:01:52 UTC) #10
pasko
https://chromiumcodereview.appspot.com/23983005/diff/37001/net/disk_cache/simple/simple_util.cc File net/disk_cache/simple/simple_util.cc (right): https://chromiumcodereview.appspot.com/23983005/diff/37001/net/disk_cache/simple/simple_util.cc#newcode107 net/disk_cache/simple/simple_util.cc:107: return data_size[0] + data_size[1] + sizeof(SimpleFileEOF); On 2013/09/16 20:01:52, ...
7 years, 3 months ago (2013-09-17 10:06:34 UTC) #11
pasko
answering previous comments now, a more in-depth review to arrive later https://chromiumcodereview.appspot.com/23983005/diff/20001/net/disk_cache/simple/simple_util.cc File net/disk_cache/simple/simple_util.cc (right): ...
7 years, 3 months ago (2013-09-17 11:29:01 UTC) #12
gavinp
https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc File net/disk_cache/simple/simple_synchronous_entry.cc (right): https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc#newcode409 net/disk_cache/simple/simple_synchronous_entry.cc:409: if (!stream_0_data) { What's happening in this case?
7 years, 3 months ago (2013-09-17 13:27:10 UTC) #13
clamy
https://codereview.chromium.org/23983005/diff/20001/net/disk_cache/simple/simple_util.cc File net/disk_cache/simple/simple_util.cc (right): https://codereview.chromium.org/23983005/diff/20001/net/disk_cache/simple/simple_util.cc#newcode86 net/disk_cache/simple/simple_util.cc:86: return GetEntryHashKeyAsHexString(key) + base::StringPrintf("_%1d", index); On 2013/09/17 11:29:01, pasko ...
7 years, 3 months ago (2013-09-17 13:59:41 UTC) #14
pasko
more thoughts, looking further https://chromiumcodereview.appspot.com/23983005/diff/37001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://chromiumcodereview.appspot.com/23983005/diff/37001/net/disk_cache/simple/simple_entry_impl.cc#newcode807 net/disk_cache/simple/simple_entry_impl.cc:807: buf_len = std::min(buf_len, GetDataSize(stream_index) - ...
7 years, 3 months ago (2013-09-17 14:17:36 UTC) #15
gavinp
https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc File net/disk_cache/simple/simple_synchronous_entry.cc (right): https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc#newcode409 net/disk_cache/simple/simple_synchronous_entry.cc:409: if (!stream_0_data) { On 2013/09/17 13:59:42, clamy wrote: > ...
7 years, 3 months ago (2013-09-17 14:25:33 UTC) #16
clamy
https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc File net/disk_cache/simple/simple_synchronous_entry.cc (right): https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc#newcode409 net/disk_cache/simple/simple_synchronous_entry.cc:409: if (!stream_0_data) { On 2013/09/17 14:25:33, gavinp wrote: > ...
7 years, 3 months ago (2013-09-17 14:29:47 UTC) #17
gavinp
https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc File net/disk_cache/simple/simple_synchronous_entry.cc (right): https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_synchronous_entry.cc#newcode409 net/disk_cache/simple/simple_synchronous_entry.cc:409: if (!stream_0_data) { On 2013/09/17 14:29:48, clamy wrote: > ...
7 years, 3 months ago (2013-09-17 15:07:42 UTC) #18
pasko
I'd need to look more closely at synchronous entry yet, and tests https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc ...
7 years, 3 months ago (2013-09-17 16:40:51 UTC) #19
gavinp
https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc#newcode1280 net/disk_cache/simple/simple_entry_impl.cc:1280: int SimpleEntryImpl::CopyStream0Data(net::IOBuffer* buf, On 2013/09/17 16:40:52, pasko wrote: > ...
7 years, 3 months ago (2013-09-17 17:09:04 UTC) #20
pasko
https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc#newcode1280 net/disk_cache/simple/simple_entry_impl.cc:1280: int SimpleEntryImpl::CopyStream0Data(net::IOBuffer* buf, On 2013/09/17 17:09:04, gavinp wrote: > ...
7 years, 3 months ago (2013-09-18 08:14:10 UTC) #21
pasko
only minor proposals in the synchronous entry. Looks as it should be. almost done, I'll ...
7 years, 3 months ago (2013-09-18 12:03:19 UTC) #22
pasko
https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_synchronous_entry.cc File net/disk_cache/simple/simple_synchronous_entry.cc (right): https://chromiumcodereview.appspot.com/23983005/diff/50001/net/disk_cache/simple/simple_synchronous_entry.cc#newcode442 net/disk_cache/simple/simple_synchronous_entry.cc:442: if (WritePlatformFile(files_[file_index], With your other CL for testing all ...
7 years, 3 months ago (2013-09-18 15:08:16 UTC) #23
clamy
https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/23983005/diff/37001/net/disk_cache/simple/simple_entry_impl.cc#newcode807 net/disk_cache/simple/simple_entry_impl.cc:807: buf_len = std::min(buf_len, GetDataSize(stream_index) - offset); On 2013/09/17 14:17:36, ...
7 years, 3 months ago (2013-09-18 16:17:14 UTC) #24
pasko
LGTM with comments addressed, congrats! please also wait for Gavin's approval. Gavin, please take a ...
7 years, 3 months ago (2013-09-18 16:53:56 UTC) #25
pasko
bad news: DiskCacheEntryTest.SimpleCacheNonSequentialWrite fails when run for stream 0, please look at that
7 years, 3 months ago (2013-09-18 17:00:19 UTC) #26
gavinp
LGTM. Is the test CL up to date now? https://codereview.chromium.org/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc#newcode799 net/disk_cache/simple/simple_entry_impl.cc:799: ...
7 years, 3 months ago (2013-09-18 17:20:34 UTC) #27
clamy
Thanks Egor for the review! The NonSequentialWrite test is passing on all streams taken independently, ...
7 years, 3 months ago (2013-09-18 17:20:45 UTC) #28
gavinp
A note on my LGTM: you can do what you will with the synchronous read/write; ...
7 years, 3 months ago (2013-09-18 17:21:11 UTC) #29
pasko
https://codereview.chromium.org/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc#newcode799 net/disk_cache/simple/simple_entry_impl.cc:799: // Since stream 0 data is kept in memory, ...
7 years, 3 months ago (2013-09-18 17:35:26 UTC) #30
clamy
Great thanks guys! https://codereview.chromium.org/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc File net/disk_cache/simple/simple_entry_impl.cc (right): https://codereview.chromium.org/23983005/diff/50001/net/disk_cache/simple/simple_entry_impl.cc#newcode799 net/disk_cache/simple/simple_entry_impl.cc:799: // Since stream 0 data is ...
7 years, 3 months ago (2013-09-18 18:29:38 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/clamy@chromium.org/23983005/87001
7 years, 3 months ago (2013-09-18 18:32:10 UTC) #32
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 3 months ago (2013-09-18 18:52:51 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/clamy@chromium.org/23983005/87001
7 years, 3 months ago (2013-09-18 19:29:27 UTC) #34
commit-bot: I haz the power
7 years, 3 months ago (2013-09-18 23:33:15 UTC) #35
Message was sent while issue was closed.
Change committed as 223989

Powered by Google App Engine
This is Rietveld 408576698