On Thu, Jul 09, 2009 at 09:52:24PM +0000, Eric Blake wrote:
Dmitry Potapov <dpotapov <at> gmail.com> writes:
quoted
With this patch, I see one 'stat' less for each directory, which on my
repo resulted in about 10.7% less 'stat' or 4.8% less of the total
number of syscalls. The total run time decreased by 4.6%.
Still, there are many stats for directories -- for each directory I see
2 + number of subdirectories it has, but I am not sure about its cause.
That would probably be the fact that in cygwin 1.5, a stat() of a directory
results in querying all the contents of the directory so as to correctly
populate the st_link member based on the number of subdirectories.
We do not use lstat or fstat provided by Cygwin. Instead of it, we use
their fast and dirty analogues, which you can find in compat/cygwin.c
(they do not provide all information that normal functions provide, but
this information is sufficient for Git.
But we still use readdir() from Cygwin and that may be source of extra
syscalls that I observe...
Dmitry