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

Issue 2774923002: Try to speed up SimpleCache index re-sync on Windows. (Closed)

Created:
3 years, 9 months ago by Maks Orlovich
Modified:
3 years, 9 months ago
Reviewers:
asanka, jkarlin
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Try to speed up SimpleCache index re-sync on Windows. FindFirstFile[Ex]/FindNextFile backing FileEnumerator there already fill in all the information we need, so no need to get it again via GetFileAttributesEx (backing base::GetFileInfo) On POSIX, of course, readdir_r doesn't provide file + timestamp info, so the separate stat is still required. This helps a lot on my not-quite-micro benchmarks (470ms -> 230ms or so), but real-life long-tail measurements can be orders of magnitude slower, so might not have the same root cause. Still, seems worthwhile since this can be a startup background task reasonably frequently. (Side note: Windows does seem to have atime, though it's documented as basically a*date* on FAT. It may be worth trying to use it to see if it helps the hit rate a bit in cases where accurate index info isn't available; might be too rare to evaluate, though) BUG=705543 Review-Url: https://codereview.chromium.org/2774923002 Cr-Commit-Position: refs/heads/master@{#459823} Committed: https://chromium.googlesource.com/chromium/src/+/5f5b9df55357e7d065bc4ecbfda8793840c18880

Patch Set 1 #

Total comments: 4

Patch Set 2 : git cl try #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -12 lines) Patch
M net/disk_cache/simple/simple_index_file.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M net/disk_cache/simple/simple_index_file.cc View 2 chunks +7 lines, -9 lines 0 comments Download
M net/disk_cache/simple/simple_index_file_posix.cc View 2 chunks +9 lines, -1 line 0 comments Download
M net/disk_cache/simple/simple_index_file_win.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 26 (18 generated)
Maks Orlovich
Seems like my test machine has an SSD, which may explain why its numbers are ...
3 years, 9 months ago (2017-03-24 17:46:54 UTC) #7
Maks Orlovich
Not sure whom to ask, so please feel encouraged to reassign as appropriate (and actually ...
3 years, 9 months ago (2017-03-27 13:49:02 UTC) #11
jkarlin
Looks good, and the wins look promising. Be sure to create a bug on and ...
3 years, 9 months ago (2017-03-27 14:09:16 UTC) #12
Maks Orlovich
(Bug of sorts added) https://codereview.chromium.org/2774923002/diff/1/net/disk_cache/simple/simple_index_file.cc File net/disk_cache/simple/simple_index_file.cc (right): https://codereview.chromium.org/2774923002/diff/1/net/disk_cache/simple/simple_index_file.cc#newcode124 net/disk_cache/simple/simple_index_file.cc:124: base::Time last_accessed, On 2017/03/27 14:09:15, ...
3 years, 9 months ago (2017-03-27 15:25:44 UTC) #14
jkarlin
lgtm, though I'm not a net/ owner. Adding asanka@.
3 years, 9 months ago (2017-03-27 15:30:25 UTC) #16
asanka
lgtm
3 years, 9 months ago (2017-03-27 16:10:43 UTC) #17
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/2774923002/20001
3 years, 9 months ago (2017-03-27 17:37:12 UTC) #23
commit-bot: I haz the power
3 years, 9 months ago (2017-03-27 17:55:51 UTC) #26
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/5f5b9df55357e7d065bc4ecbfda8...

Powered by Google App Engine
This is Rietveld 408576698