fileops: stat() before open()ing in git_futils_readbuffer_updated()
This reverts refactoring done in 13224ea4 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.
Showing
Please
register
or
sign in
to comment