X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Re: Slow directory listing Date: Thu, 5 Jul 2007 12:55:06 -0700 Message-ID: From: "Anton Ivanov" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l65JtHZp000995 >> I experience a problem whereby 'ls' of a directory takes upwards of 20 >> seconds. I've searched around the archives and found reports of issues >> that could be similar (i.e. slow bash completion) but it didn't seem >> like any action was taken. >Cygwin is slow. This is by design. 20 seconds even sounds pretty fast >for a large directory. >It's not clear whether you mean you were doing "ls -l" or just "ls", but >in either case expect to wait. In order to provide a POSIX environment >Cygwin has to synthesize a number things that the system does not >provide, or does not provide in a convenient or efficient interface. >Examples: symlinks, the executable mode bit, and .exe-magic. Just >running 'ls' means that every file in the directory has to be indivually >queried and opened (and in some cases read from) in order to provide all >the fields in the POSIX stat struct, compared to running the native >"dir" command which can simply read out the entries from the directory >and nothing else. As I said the directory for which the listing takes a long time to produce contains only 22 entries. I tried 'ls', not 'ls -l'. Are you saying that in order to construct a 'stat' structure for a directory, cygwin must examine the contents of subdirectories? This sounds too strange to believe. Which fields of 'stat' in particular require this? Why is it that listing '/' is not at all slow? It still appears to me that in my particular case the slow-down is not necessary. -- 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/