Skip to content

Conversation

@atetubou
Copy link

When I do git fetch, git call file stats under .git/objects for each
refs. This takes time when there are many refs.

By enabling fscache, git takes file stats by directory traversing and that
improved the speed of fetch-pack for repository having large number of
refs.

In my windows workstation, this improves the time of git fetch for
chromium repository like below. I took stats 3 times.

  • With this patch
    TotalSeconds: 9.9825165
    TotalSeconds: 9.1862075
    TotalSeconds: 10.1956256
    Avg: 9.78811653333333

  • Without this patch
    TotalSeconds: 15.8406702
    TotalSeconds: 15.6248053
    TotalSeconds: 15.2085938
    Avg: 15.5580231

Signed-off-by: Takuto Ikuta tikuta@chromium.org

When I do git fetch, git call file stats under .git/objects for each
refs. This takes time when there are many refs.

By enabling fscache, git takes file stats by directory traversing and that
improved the speed of fetch-pack for repository having large number of
refs.

In my windows workstation, this improves the time of `git fetch` for
chromium repository like below. I took stats 3 times.

* With this patch
TotalSeconds: 9.9825165
TotalSeconds: 9.1862075
TotalSeconds: 10.1956256
Avg: 9.78811653333333

* Without this patch
TotalSeconds: 15.8406702
TotalSeconds: 15.6248053
TotalSeconds: 15.2085938
Avg: 15.5580231

Signed-off-by: Takuto Ikuta <tikuta@chromium.org>
@atetubou
Copy link
Author

This is reland of #1372
But for faster stats of loose object files under .git/objects, not to cache stats under .git/objects/pack

@dscho dscho merged commit d0192a7 into git-for-windows:master Jan 12, 2018
@dscho
Copy link
Member

dscho commented Jan 12, 2018

Thanks, looks good!

@atetubou atetubou deleted the fetch_pack branch January 16, 2018 12:37
@dscho dscho mentioned this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet