summaryrefslogtreecommitdiff
path: root/tests/diff/diffiter.c
diff options
context:
space:
mode:
authorBrodie Rao <brodie@sf.io>2013-08-13 10:55:37 -0700
committerBrodie Rao <brodie@sf.io>2013-08-13 10:55:37 -0700
commit9ccdb21155b3c9650acf58c55b2596c3503ea14d (patch)
treece304d88b61c99aaa8c73ff7894512882ac64174 /tests/diff/diffiter.c
parent14da618260be02c63b4f08dca8e6ab479f7449d7 (diff)
downloadlibgit2-9ccdb21155b3c9650acf58c55b2596c3503ea14d.tar.gz
fileops: stat() before open()ing in git_futils_readbuffer_updated()
This reverts refactoring done in 13224ea4aad9a1b3c9cc4c992ceaea9af623e047 that introduces a performance regression for NFS when reading files that don't exist. open() forces a cache invalidation on NFS, while stat()ing a file just uses the cache and is very quick. To give a specific example, say you have a repo with a thousand packed refs. Before this change, looking up every single one ould incur a thousand slow open() calls. With this change, it's a thousand fast stat() calls.
Diffstat (limited to 'tests/diff/diffiter.c')
0 files changed, 0 insertions, 0 deletions