X-Spam-Check-By: sourceware.org Message-ID: <453BB9AD.7010505@tlinx.org> Date: Sun, 22 Oct 2006 11:34:21 -0700 From: Linda Walsh User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: costly accurate link counts, Vista compat...(was Re: questions about excessive disk usage when doing tab completion) References: <453AAF44 DOT 4040201 AT 666 DOT com> <453AB8FD DOT 3030209 AT byu DOT net> In-Reply-To: <453AB8FD.3030209@byu.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/, 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/