New issue
Advanced search Search tips

Issue 705543 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Apr 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Index sync performance on Windows isn't that great.

Project Member Reported by morlovich@chromium.org, Mar 27 2017

Issue description

SimpleCache.Http.IndexRestoreTime on Windows can be quite large, even at median. This means some of the early cache loads may be done without an accurate index, causing useless I/O. 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f5b9df55357e7d065bc4ecbfda8793840c18880

commit 5f5b9df55357e7d065bc4ecbfda8793840c18880
Author: morlovich <morlovich@chromium.org>
Date: Mon Mar 27 17:54:58 2017

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}

[modify] https://crrev.com/5f5b9df55357e7d065bc4ecbfda8793840c18880/net/disk_cache/simple/simple_index_file.cc
[modify] https://crrev.com/5f5b9df55357e7d065bc4ecbfda8793840c18880/net/disk_cache/simple/simple_index_file.h
[modify] https://crrev.com/5f5b9df55357e7d065bc4ecbfda8793840c18880/net/disk_cache/simple/simple_index_file_posix.cc
[modify] https://crrev.com/5f5b9df55357e7d065bc4ecbfda8793840c18880/net/disk_cache/simple/simple_index_file_win.cc

Status: Fixed (was: Untriaged)
Stats look good on canary + dev

Sign in to add a comment