delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/07/12:05:42

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Tue, 7 Sep 2010 11:05:06 -0500
Message-ID: <AANLkTi=ASzGNwU9TSKU2TZSbAksy6=Pu94=0S5Vt0Sc-@mail.gmail.com>
Subject: incredibly slow file listing script on windoze 7 pro 4 core 64 bit
From: mike marchywka <marchywka AT gmail DOT com>
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
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
Note-from-DJ: This may be spam

this takes a few minutes on old debian machine, taking much longer
here on same data-
about 19k file about 24Gb total size.
Windoze finally has better perf stuff but still no help- one core at
25 pct all kernel
time disk not exactly busy. All the time is in the "ls" loop not the
find command.
Now obbviously I expect the "ls" per file has to make a bunch of OS calls for
each file but still even with cygwin layer seems a bit much.
Thanks.

$ more tots
foo=""
#ls -al `find -type f| awk '{print \$0}' `  | awk '{tot=tot+\$5; }END{print tot}
'
#ls -al `find -type f `  | awk '{tot=tot+$5; }END{print tot}'
find -type f > xxx
cat xxx | while read
do
ls -al "$REPLY"
done  | awk '{tot=tot+$5; }END{print tot}'

--
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