delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/02/08/18:18:07

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: Uu383n6swBCEN1G9up0WSnxbvN8fCPmk
Message-ID: <4D51CF21.7060400@cygwin.com>
Date: Tue, 08 Feb 2011 18:17:53 -0500
From: "Larry Hall \(Cygwin\)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: AW: How to make "ls" as quick as a Windows "dir"?
References: <99C327BE35E54B81B97E7DCAF53941A2 AT sulzer DOT de> <4D4F628A DOT 5000000 AT cygwin DOT com> <EDFB85E08A3F4567BA2D3B2F6D1ED5FE AT sulzer DOT de>
In-Reply-To: <EDFB85E08A3F4567BA2D3B2F6D1ED5FE@sulzer.de>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 2/8/2011 5:25 PM, Paul Maier wrote:
>> The best thing to do is to skip any flags for 'ls'.  If cygwin has to open
>> the file to fill in a particular piece of data, you're going to see
>> significant delays on a slow file-system/driver.
>
> So the difference is, that "ls -l" openes all files, reading in all bytes to
> count them; while Windows "dir" gets the file size from the directory?

No, it doesn't need to do that for some readily available data like the
file size.  But determining whether the file is executable or a symbolic
link can cause the file to be opened.  Obviously this takes more time than
reading meta-data and on a slow file system, the lag will be felt more
intensely.

If you're only seeing the slow-down with Cygwin facilities and things
like 'cd' are very slow too, then it seems like this is something that's
at least more acutely felt under Cygwin.  why that would be I'm not even
going to guess. :-)

Perhaps it's time for a full problem report.  See the link below for
specifics on what should be in such a report.

http://cygwin.com/problems.html


-- 
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019