Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

Re: [PATCH 3/3] Avoid doing extra 'lstat()'s for d_type if we have an up-to-date cache entry

From: Eric Blake <hidden>
Date: 2016-06-15 22:47:02

Possibly related (same subject, not in this thread)

Dmitry Potapov <dpotapov <at> gmail.com> writes:
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.  In cygwin
1.7, in addition to adding the d_type member to readdir, stat was also changed
to blindly return st_link of 1 for all directories rather than wasting time
populating the st_link member (since Windows provides no efficient way of
accessing that number).

-- 
Eric Blake
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help