X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; q=dns; s=default; b=lH1m0D+P4fS/sm//+lAQs/Ah/0l1c
	pEVB2Q0i1yjqPIm1pz/IXhzEuVrmP08spLcSGHH6A4PtaWjkfM25c9JCmzgN4MaP
	P+1e/qYj39szzIcZE436gHkiFP2OIfo6YfLepq2y4I1IJzfit4mM+MwYUrzhdT5u
	vFt9sHhOgj2khg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; s=default; bh=TsIAMqZL6AORqqOmeyD9Nfeh4oc=; b=nxk
	hZxc6CLxirPsU2Il19Wy94iDC3jpdKq6P8FSxQJ6/6LmjCPqO57vZuGW5wTLuxLH
	mYvcxIlm60RXlTLYpvQpPoWtuy3y/WvTToiB4R0AND5hn6s1Qz3Q1GKubWaifhle
	EdtUkYJWOAUySB15/3awjwo21y29TBLL3DQAu56c=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.4 required=5.0 tests=AWL,BAYES_50,CYGWIN_OWNER_BODY,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=stromeko@nexgo.de, stromekonexgode, 86, U*stromeko
X-HELO: mail1.bemta8.messagelabs.com
X-Env-Sender: bsmith@progress.com
X-Msg-Ref: server-5.tower-95.messagelabs.com!1453405948!11150298!1
X-StarScan-Received:
X-StarScan-Version: 7.35.1; banners=-,-,-
X-VirusChecked: Checked
From: Bill Smith <bsmith@progress.com>
To: "William M. (Mike) Miller" <william.m.miller@gmail.com>,
        "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Performance of "ls -F"
Date: Thu, 21 Jan 2016 19:52:21 +0000
Message-ID: <3a9ff6ec2d5e4e64a96a8f8e31d12f22@ntmaexbe04.bedford.progress.com>
References: <loom.20160121T163405-489@post.gmane.org> <CAH5rLZVWiGz2n-3Ru-C0_5KU-Cc4NipJPn1NQVphN2UetUK4iA@mail.gmail.com>
In-Reply-To: <CAH5rLZVWiGz2n-3Ru-C0_5KU-Cc4NipJPn1NQVphN2UetUK4iA@mail.gmail.com>
x-ms-exchange-transport-fromentityheader: Hosted
x-ems-proccessed: +CmIlJ+kdV7Z341JADFd9w==
x-ems-stamp: lSIEZtHqMnrhVuVGmcwzVQ==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id u0LJqjxa010468

In my particular case, we're seeing this behavior:

7-mode: (//devnas04/largedisk/bsmith/netapp)

:$ //devnas04/largedisk/bsmith/netapp>time ls -ld struct5*
-rw-r--r-- 1 bsmith Domain Users 0 Nov  5 10:25 struct51.log
[snipped]
-rw-r--r-- 1 bsmith Domain Users 0 Nov  5 10:26 struct5z.prf

real    0m1.308s
user    0m0.031s
sys     0m0.125s


cdot-mode: (//rdlserv/testdata/rdl117_nt/test)

:$ //rdlserv/testdata/rdl117_nt/test>time ls -ld struct5*
-rwxrwx---+ 1 Unknown+User Unknown+Group 23047 Nov  4 21:47 struct51.log
[snipped]
-rwxr-x---+ 1 Unknown+User Unknown+Group   595 Oct 31 23:53 struct5z.prf

real    1m7.698s
user    0m0.249s
sys     0m11.484s

The difference is 1.3 seconds versus 1 minute 7 seconds.  The directory is identical on the two NetApps and they both contain ~29K files.  C-dot (Cluster Data On Tap) is the newest operating system for the NetApp.  It also supports the newer SMB protocols.

I also tried the experiment with MKS Toolkit 8.6 and in both cases, it takes around .1 seconds.



> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On
> Behalf Of William M. (Mike) Miller
> Sent: Thursday, January 21, 2016 10:53 AM
> To: cygwin@cygwin.com
> Subject: Re: Performance of "ls -F"
> 
> On Thu, Jan 21, 2016 at 10:44 AM, Achim Gratz <Stromeko@nexgo.de>
> wrote:
> > I am finding a large performance gap between plain "ls" and "ls -F" in
> > a directory with many files on a network share (NetApp disguised as
> > NTFS if that matters).  This has been there for quite a while, I've
> > just now realized what the reason was (I have "ls -F" as an alias for
> > "ls" in my interactive shells).  In a directory with 1300 files, a
> > plain "ls" completes in 0.3s, while "ls -F" requires about 95s.
> > Determining the file class seems to require around 70...90ms per file,
> > which I can confirm also for directories with a lot less files.
> > What's involved in that determination that takes such a long time?
> 
> The overhead appears to be in checking for executable files; using --file-type
> instead of -F, which just omits the '*' category, reduces the time for ls in one
> of my (local) large directories from over one second to 0.04 seconds.
> 
> --
> William M. (Mike) Miller | Edison Design Group william.m.miller@gmail.com
> 
> --
> 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


