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: Subject: incredibly slow file listing script on windoze 7 pro 4 core 64 bit From: mike marchywka To: cygwin Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes 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 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