X-Recipient: archive-cygwin@delorie.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@cygwin.com>
Reply-To: cygwin@cygwin.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@cygwin.com
Subject: Re: AW: How to make "ls" as quick as a Windows "dir"?
References: <99C327BE35E54B81B97E7DCAF53941A2@sulzer.de> <4D4F628A.5000000@cygwin.com> <EDFB85E08A3F4567BA2D3B2F6D1ED5FE@sulzer.de>
In-Reply-To: <EDFB85E08A3F4567BA2D3B2F6D1ED5FE@sulzer.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

