Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkout.c: enable fscache for checkout again #1468

Merged
merged 1 commit into from
Feb 27, 2018

Commits on Jan 30, 2018

  1. checkout.c: enable fscache for checkout again

    This is retry of git-for-windows#1419.
    
    I added flush_fscache macro to flush cached stats after disk writing
    with tests for regression reported in git-for-windows#1438 and git-for-windows#1442.
    
    git checkout checks each file path in sorted order, so cache flushing does not
    make performance worse unless we have large number of modified files in
    a directory containing many files.
    
    Using chromium repository, I tested `git checkout .` performance when I
    delete 10 files in different directories.
    With this patch:
    TotalSeconds: 4.307272
    TotalSeconds: 4.4863595
    TotalSeconds: 4.2975562
    Avg: 4.36372923333333
    
    Without this patch:
    TotalSeconds: 20.9705431
    TotalSeconds: 22.4867685
    TotalSeconds: 18.8968292
    Avg: 20.7847136
    
    I confirmed this patch passed all tests in t/ with core_fscache=1.
    
    Signed-off-by: Takuto Ikuta <tikuta@chromium.org>
    Takuto Ikuta committed Jan 30, 2018
    Configuration menu
    Copy the full SHA
    71cc0bd View commit details
    Browse the repository at this point in the history