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

Issue 2004913002: SimpleCache: open with fewer seeks. (Closed)

Created:
4 years, 7 months ago by gavinp
Modified:
4 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

SimpleCache: open with fewer seeks. There's usually no reason to read the file header before reading the stream 0 (headers) data when opening a simple cache entry. By not doing so, seeks in the critical path of the loading headers are reduced, which should speed up http caching performance. To be careful, the headers are still checked when the first read of data (if any) is performed. This delays detecting hash collisions in the cache, because the header data is required to compare keys (instead of just hashes). To compensate for the later key comparison, a SHA256 of the key is stored as an optional prefix to the end of file record. This is used to validate the key is correct before returning headers to the client. Because the key checking logic is now totally migrated back into the SimpleSynchronousEntry, we can return to reporting on key matching in the SyncOpenResult histograms. R=juliatuttle@chromium.org,asvitkine@chromium.org,rdsmith@chromium.org BUG=611732 Review-Url: https://codereview.chromium.org/1977863003 Cr-Commit-Position: refs/heads/master@{#395083} (cherry picked from commit 9f15f2258d7cae8cd12cb4ef7143ad648a958333) Committed: https://chromium.googlesource.com/chromium/src/+/3b7225481e277fb9cbaadc6aa37654a59e0457f8

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+561 lines, -231 lines) Patch
M net/disk_cache/backend_unittest.cc View 5 chunks +30 lines, -5 lines 0 comments Download
M net/disk_cache/entry_unittest.cc View 7 chunks +79 lines, -6 lines 0 comments Download
M net/disk_cache/simple/simple_backend_impl.cc View 2 chunks +1 line, -31 lines 0 comments Download
M net/disk_cache/simple/simple_entry_format.h View 2 chunks +9 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.h View 1 chunk +5 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_entry_impl.cc View 3 chunks +13 lines, -16 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.h View 10 chunks +45 lines, -23 lines 0 comments Download
M net/disk_cache/simple/simple_synchronous_entry.cc View 30 chunks +249 lines, -129 lines 0 comments Download
M net/disk_cache/simple/simple_test_util.h View 1 chunk +8 lines, -0 lines 0 comments Download
M net/disk_cache/simple/simple_test_util.cc View 2 chunks +77 lines, -4 lines 0 comments Download
M net/disk_cache/simple/simple_util.h View 1 chunk +8 lines, -4 lines 0 comments Download
M net/disk_cache/simple/simple_util.cc View 1 chunk +9 lines, -7 lines 0 comments Download
M net/disk_cache/simple/simple_util_unittest.cc View 3 chunks +6 lines, -5 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 4 chunks +22 lines, -1 line 0 comments Download

Messages

Total messages: 2 (1 generated)
gavinp
4 years, 7 months ago (2016-05-23 15:02:53 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
3b7225481e277fb9cbaadc6aa37654a59e0457f8.

Powered by Google App Engine
This is Rietveld 408576698