costly accurate link counts, Vista compat...(was Re: questions about excessive disk usage when doing tab completion)

Linda Walsh cygwin@tlinx.org
Sun Oct 22 18:48:00 GMT 2006



Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Ben Wing on 10/21/2006 5:37 PM:
>> I am using zsh on the latest cygwin and the first time I load it up and
>> try to do tab completion on e.g. /mnt/g/download/<TAB>, it spends an
>> inordinate amount of time grinding the disk -- sometimes on the order of
>> 2 minutes or more.  
>> granted, the subdirs have a lot in them; evidently it's grinding its way 
>> through all of the subdirs.  but why?  
>> the directory contains only 8 subdirs:
>> drwxrwxrwx+ 160 Ben None 0 Oct 16 11:03 utorrent/
>                ^^^
>
> This might be why - to correctly fill out the n_link member of struct stat
        ^^^
---
    Might be?  Sounds like it could exactly explain his symptoms 
regardless of
cygcheck output and other factors.  He wanted to know why cygwin was 
grinding its
way through the contents of the subdirectories and ...
> for a directory on a local drive, cygwin counts how many subdirectories
> live in that directory.  Depending on how your disk is filled, it may take
> some time to effectively readdir the directory to get that count.
> Extra-full directories take longer to traverse
---
    Seems like this would explain it.  Ouch.  I forget that NT doesn't 
have the ".."
in it's directories that would increment a "link" count somewhere.

    How many programs rely on accurate link counts for directories in 
order to
function correctly or if it would be possible to set a flag (env CYGWIN?) to
not bother and achieve any efficiency gains...?  (Of course Cygwin is 
already faster
than MS's own POSIX subsystem;  Such compatibility may be one reason why 
MS dropped
future revisions of their Interix (POSIX) subsystem support.  I wonder 
if it even
runs on Vista?  For that matter, anyone tried Cygwin to see if there are 
any compatibility
issues for Cygwin on Vista?

-l


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list