From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Viktors Berstis Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 01 May 2019 22:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 35531@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155675116014139 (code B ref -1); Wed, 01 May 2019 22:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 May 2019 22:52:40 +0000 Received: from localhost ([127.0.0.1]:45164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLy5g-0003fz-Bs for submit@debbugs.gnu.org; Wed, 01 May 2019 18:52:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLxKf-0002Uq-7o for submit@debbugs.gnu.org; Wed, 01 May 2019 18:04:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:60957) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLxKZ-0001jq-16 for submit@debbugs.gnu.org; Wed, 01 May 2019 18:03:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLxKY-0000R4-6I for bug-coreutils@gnu.org; Wed, 01 May 2019 18:03:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLxKX-0001iw-2p for bug-coreutils@gnu.org; Wed, 01 May 2019 18:03:57 -0400 Received: from jax4mhob20.registeredsite.com ([64.69.218.108]:58510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLxKW-0001RV-Qw for bug-coreutils@gnu.org; Wed, 01 May 2019 18:03:56 -0400 Received: from mymail.myregisteredsite.com (jax4wmnode1g.mymail.myregisteredsite.com [209.237.134.208]) by jax4mhob20.registeredsite.com (8.14.4/8.14.4) with SMTP id x41M3ee9068603 for ; Wed, 1 May 2019 18:03:40 -0400 Received: (qmail 32588 invoked by uid 80); 1 May 2019 22:03:40 -0000 Received: from unknown (HELO ?10.53.38.49?) (viktors@berstis.com@63.230.168.74) by mymail.myregisteredsite.com with ESMTPA; 1 May 2019 22:03:40 -0000 From: Viktors Berstis Message-ID: Date: Wed, 1 May 2019 15:03:31 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by jax4mhob20.registeredsite.com id x41M3ee9068603 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 64.69.218.108 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Wed, 01 May 2019 18:52:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) When running "ls" or "ls -U" on a windows directory containing 50000=20 files, ls takes forever.=C2=A0 Something seems to be highly inefficient i= n there. This is for the 64 bit version build 4/20/2005 11:41AM.=C2=A0 The exe siz= e is=20 180736 bytes. Thanks. - Viktors Berstis From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Kamil Dudka Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 02 May 2019 05:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: 35531@debbugs.gnu.org X-Debbugs-Original-Cc: bug-coreutils@gnu.org, 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155677584719619 (code B ref 35531); Thu, 02 May 2019 05:45:02 +0000 Received: (at 35531) by debbugs.gnu.org; 2 May 2019 05:44:07 +0000 Received: from localhost ([127.0.0.1]:45410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM4Vr-00056N-FW for submit@debbugs.gnu.org; Thu, 02 May 2019 01:44:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hM4Vm-00055j-Nw for 35531@debbugs.gnu.org; Thu, 02 May 2019 01:44:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01A96307D935; Thu, 2 May 2019 05:43:57 +0000 (UTC) Received: from kdudka-nb.localnet (unknown [10.40.205.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 17E907EE77; Thu, 2 May 2019 05:43:55 +0000 (UTC) From: Kamil Dudka Date: Thu, 02 May 2019 07:44:03 +0200 Message-ID: <2308435.SNFTBmOKoa@kdudka-nb> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 02 May 2019 05:43:57 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) On Thursday, May 2, 2019 12:03:31 AM CEST Viktors Berstis wrote: > When running "ls" or "ls -U" on a windows directory containing 50000 > files, ls takes forever. Something seems to be highly inefficient in there. Could you please try it with ls -U -1? Kamil > This is for the 64 bit version build 4/20/2005 11:41AM. The exe size is > 180736 bytes. > > Thanks. > > - Viktors Berstis From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils References: In-Reply-To: Resent-From: Viktors Berstis Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 02 May 2019 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 35531@debbugs.gnu.org Cc: kdudka@redhat.com Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155683902212124 (code B ref 35531); Thu, 02 May 2019 23:18:01 +0000 Received: (at 35531) by debbugs.gnu.org; 2 May 2019 23:17:02 +0000 Received: from localhost ([127.0.0.1]:47292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMKwn-00039T-DJ for submit@debbugs.gnu.org; Thu, 02 May 2019 19:17:01 -0400 Received: from jax4mhob21.registeredsite.com ([64.69.218.109]:57766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMKtC-00033a-PO for 35531@debbugs.gnu.org; Thu, 02 May 2019 19:13:19 -0400 Received: from mymail.myregisteredsite.com (jax4wmnode1a.mymail.myregisteredsite.com [209.237.134.202]) by jax4mhob21.registeredsite.com (8.14.4/8.14.4) with SMTP id x42ND7AH144849 for <35531@debbugs.gnu.org>; Thu, 2 May 2019 19:13:07 -0400 Received: (qmail 19917 invoked by uid 80); 2 May 2019 23:13:07 -0000 Received: from unknown (HELO ?10.53.38.49?) (viktors@berstis.com@63.230.168.74) by mymail.myregisteredsite.com with ESMTPA; 2 May 2019 23:13:07 -0000 From: Viktors Berstis Message-ID: Date: Thu, 2 May 2019 16:12:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 02 May 2019 19:16:59 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) My machine has 64GB of ram, 6 core 3.5ghz processor and fast disks. The directory in question has 57,600 files in it with a total size of about 47gb. On a freshly booted machine (nothing cached),  "dir /on dirname | wc" takes about 6 seconds.  The second time it takes about 2 seconds. On a freshly booted machine, "ls -U -1 dirname | wc" takes 5 minutes 48 seconds!  A second time it is about a minute less. ls might be doing something akin to opening every file.  If I run a program to actually open and read every file in that directory, the system seems to cache it all in ram.  Then the ls takes only about 11 seconds. - Viktors Berstis Kamil Dudka wrote: > On Thursday, May 2, 2019 12:03:31 AM CEST Viktors Berstis wrote: >> When running "ls" or "ls -U" on a windows directory containing 50000 >> files, ls takes forever. Something seems to be highly inefficient in there. > Could you please try it with ls -U -1? > > Kamil > >> This is for the 64 bit version build 4/20/2005 11:41AM. The exe size is >> 180736 bytes. >> >> Thanks. >> >> - Viktors Berstis > From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 00:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: kdudka@redhat.com, 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155684229016965 (code B ref 35531); Fri, 03 May 2019 00:12:02 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 00:11:30 +0000 Received: from localhost ([127.0.0.1]:47348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMLnW-0004PZ-9n for submit@debbugs.gnu.org; Thu, 02 May 2019 20:11:30 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMLnU-0004PL-Gx for 35531@debbugs.gnu.org; Thu, 02 May 2019 20:11:29 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E62531618E3; Thu, 2 May 2019 17:11:21 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QT5EC-CQ-Vxk; Thu, 2 May 2019 17:11:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3980A1618EA; Thu, 2 May 2019 17:11:21 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PFCzzKJpvUPO; Thu, 2 May 2019 17:11:21 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1AE481618D4; Thu, 2 May 2019 17:11:21 -0700 (PDT) References: From: Paul Eggert Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABzSBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PsLBfgQTAQIAKAUCTIByZAIbAwUJEswDAAYLCQgHAwIG FQgCCQoLBBYCAwECHgECF4AACgkQ7ZfpDmKqfjRR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Computer Science Department Message-ID: Date: Thu, 2 May 2019 17:11:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) It's probably something inside the kernel (e.g., filesystem code). What does the shell command 'strace -o /tmp/tr -s 128 -T ls -U -1 dirname | wc' say? You can see which system calls are taking the most time by then running 'sort -t"<" -k2n /tmp/tr'. On my platform (Fedora 29 x86-64 ext4, an older desktop with only disk drives), the hoggiest syscalls are getdents64, which are as much as 24 ms per call when the data are not cached, and more like 0.7 ms per call when the data are cached (each such call retrieves about 1000 directory entries). What do you see? From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Viktors Berstis Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 01:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert Cc: kdudka@redhat.com, 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155684630823159 (code B ref 35531); Fri, 03 May 2019 01:19:02 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 01:18:28 +0000 Received: from localhost ([127.0.0.1]:47421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMMqK-00061T-9s for submit@debbugs.gnu.org; Thu, 02 May 2019 21:18:28 -0400 Received: from jax4mhob22.registeredsite.com ([64.69.218.110]:50844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMMHH-0005Bq-AG for 35531@debbugs.gnu.org; Thu, 02 May 2019 20:42:15 -0400 Received: from mymail.myregisteredsite.com (jax4wmnode1f.mymail.myregisteredsite.com [209.237.134.207]) by jax4mhob22.registeredsite.com (8.14.4/8.14.4) with SMTP id x430g2gU080226 for <35531@debbugs.gnu.org>; Thu, 2 May 2019 20:42:02 -0400 Received: (qmail 10157 invoked by uid 80); 3 May 2019 00:42:02 -0000 Received: from unknown (HELO ?10.53.38.49?) (viktors@berstis.com@63.230.168.74) by mymail.myregisteredsite.com with ESMTPA; 3 May 2019 00:42:02 -0000 References: From: Viktors Berstis Message-ID: Date: Thu, 2 May 2019 17:41:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 02 May 2019 21:18:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I am running coreutlls on Windows, not linux... so strace does not work there. The November 10, 1999 version 3.16 of coreutils "ls" command is lightning fast on Windows (and on the large directory) but unfortunately stops at 32K files.  The newer version of "ls" built for Windows has the problem. By "new" version, I am using the 64 bit build for windows dated 4/20/2005 at 11:41AM with exe size of 180736 bytes, md5sum: 47ba770d80382cbd66ddba13924c1417  Version 5.3.0  .  I didn't see a place to download a newer binary version to try. BTW, booting the machine with Ubuntu, ls on that same large directory is very fast. - Viktors Berstis Paul Eggert wrote: > It's probably something inside the kernel (e.g., filesystem code). > > What does the shell command 'strace -o /tmp/tr -s 128 -T ls -U -1 > dirname | wc' say? You can see which system calls are taking the most > time by then running 'sort -t"<" -k2n /tmp/tr'. On my platform (Fedora > 29 x86-64 ext4, an older desktop with only disk drives), the hoggiest > syscalls are getdents64, which are as much as 24 ms per call when the > data are not cached, and more like 0.7 ms per call when the data are > cached (each such call retrieves about 1000 directory entries). What do > you see? > > From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 01:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: kdudka@redhat.com, 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155684642823351 (code B ref 35531); Fri, 03 May 2019 01:21:01 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 01:20:28 +0000 Received: from localhost ([127.0.0.1]:47425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMMsF-00064Z-Tx for submit@debbugs.gnu.org; Thu, 02 May 2019 21:20:28 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMMsC-00064K-T6 for 35531@debbugs.gnu.org; Thu, 02 May 2019 21:20:26 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 800921618EE; Thu, 2 May 2019 18:20:18 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pfGgAwlEBFih; Thu, 2 May 2019 18:20:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D516A16190C; Thu, 2 May 2019 18:20:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Hzpiy3_iJH7H; Thu, 2 May 2019 18:20:17 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B5EB0161639; Thu, 2 May 2019 18:20:17 -0700 (PDT) References: From: Paul Eggert Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxd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IvJlxGAYz8PSfuGCB 1thMYqlmgdhd9/BabGFbGGYHA6U4/T5zqU+f6xHy1SsAQZ1MSKlLwekBIT+4/cLRGqCHjnV0 q5H/T6a7t5mPkbzSrOLSo4puj+IToNjYyYIDBWzhlA19avOa+rvUjmHtD3sFN7cXWtkGoi8b uNcby4U= Organization: UCLA Computer Science Department Message-ID: <25feaf25-6611-c8f8-e191-30230841f36f@cs.ucla.edu> Date: Thu, 2 May 2019 18:20:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 5/2/19 5:41 PM, Viktors Berstis wrote: > The newer version of "ls" built for Windows has the problem. Ah, then you'll have to talk to whoever built that version, which is not me (and generally speaking they don't hang out on this mailing list). From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Viktors Berstis Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 03:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert Cc: kdudka@redhat.com, 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.15568550273740 (code B ref 35531); Fri, 03 May 2019 03:44:02 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 03:43:47 +0000 Received: from localhost ([127.0.0.1]:47478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMP6x-0000yG-7e for submit@debbugs.gnu.org; Thu, 02 May 2019 23:43:47 -0400 Received: from jax4mhob19.registeredsite.com ([64.69.218.107]:52932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMP6v-0000y8-Tx for 35531@debbugs.gnu.org; Thu, 02 May 2019 23:43:46 -0400 Received: from mymail.myregisteredsite.com (jax4wmnode1b.mymail.myregisteredsite.com [209.237.134.203]) by jax4mhob19.registeredsite.com (8.14.4/8.14.4) with SMTP id x433ha2Q088193 for <35531@debbugs.gnu.org>; Thu, 2 May 2019 23:43:36 -0400 Received: (qmail 20505 invoked by uid 80); 3 May 2019 03:43:36 -0000 Received: from unknown (HELO ?10.53.38.49?) (viktors@berstis.com@63.230.168.74) by mymail.myregisteredsite.com with ESMTPA; 3 May 2019 03:43:36 -0000 References: <25feaf25-6611-c8f8-e191-30230841f36f@cs.ucla.edu> From: Viktors Berstis Message-ID: <5992c605-f6ba-7133-f339-031c7cafea2c@berstis.com> Date: Thu, 2 May 2019 20:43:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: <25feaf25-6611-c8f8-e191-30230841f36f@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I downloaded it from https://sourceforge.net/projects/gnuwin32/files/coreutils/5.3.0/coreutils-5.3.0.exe/download The help said "Report bugs to " which is what I did. The build is so old that I suspect none of the original players are around. Do you know of a windows binary or windows source that is newer anywhere?  Thanks. - Viktors Berstis Paul Eggert wrote: > On 5/2/19 5:41 PM, Viktors Berstis wrote: >> The newer version of "ls" built for Windows has the problem. > Ah, then you'll have to talk to whoever built that version, which is not > me (and generally speaking they don't hang out on this mailing list). > > From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Kamil Dudka Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: Paul Eggert , 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.15568821464257 (code B ref 35531); Fri, 03 May 2019 11:16:02 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 11:15:46 +0000 Received: from localhost ([127.0.0.1]:47842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMWAL-00016a-Un for submit@debbugs.gnu.org; Fri, 03 May 2019 07:15:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMWAK-00016O-1w for 35531@debbugs.gnu.org; Fri, 03 May 2019 07:15:44 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F010E3097035; Fri, 3 May 2019 11:15:37 +0000 (UTC) Received: from kdudka-nb.localnet (unknown [10.43.2.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1715560BF7; Fri, 3 May 2019 11:15:36 +0000 (UTC) From: Kamil Dudka Date: Fri, 03 May 2019 13:15:44 +0200 Message-ID: <4564787.RE4qx4JxAx@kdudka-nb> In-Reply-To: <5992c605-f6ba-7133-f339-031c7cafea2c@berstis.com> References: <25feaf25-6611-c8f8-e191-30230841f36f@cs.ucla.edu> <5992c605-f6ba-7133-f339-031c7cafea2c@berstis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 03 May 2019 11:15:38 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) On Friday, May 3, 2019 5:43:20 AM CEST Viktors Berstis wrote: > I downloaded it from > https://sourceforge.net/projects/gnuwin32/files/coreutils/5.3.0/coreutils-5. > 3.0.exe/download The help said "Report bugs to " > which is what I did. The build is so old that I suspect none of the > original players are around. Do you know of a windows binary or windows > source that is newer > anywhere? Thanks. > > - Viktors Berstis `ls -U1` will not run significantly faster than `ls` on powerful hardware. The key difference is that `ls -U1` prints the results continuously as the list of files is read from file system whereas `ls` will be silent until the complete list is read. You need to use a new enough version of coreutils for this to work properly. This optimisation was introduced in coreutils-7.5: https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v7.0~113 https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v7.5~49 Kamil > Paul Eggert wrote: > > On 5/2/19 5:41 PM, Viktors Berstis wrote: > >> The newer version of "ls" built for Windows has the problem. > > > > Ah, then you'll have to talk to whoever built that version, which is not > > me (and generally speaking they don't hang out on this mailing list). From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Viktors Berstis Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Kamil Dudka Cc: Paul Eggert , 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155689901823388 (code B ref 35531); Fri, 03 May 2019 15:57:02 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 15:56:58 +0000 Received: from localhost ([127.0.0.1]:49384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMaYU-00065A-4R for submit@debbugs.gnu.org; Fri, 03 May 2019 11:56:58 -0400 Received: from jax4mhob13.myregisteredsite.com ([64.69.218.93]:40518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMaYS-000652-Lh for 35531@debbugs.gnu.org; Fri, 03 May 2019 11:56:57 -0400 Received: from mymail.myregisteredsite.com (jax4wmnode1a.mymail.myregisteredsite.com [209.237.134.202]) by jax4mhob13.myregisteredsite.com (8.14.4/8.14.4) with SMTP id x43FusMB013588 for <35531@debbugs.gnu.org>; Fri, 3 May 2019 11:56:54 -0400 Received: (qmail 12973 invoked by uid 80); 3 May 2019 15:56:53 -0000 Received: from unknown (HELO ?10.53.38.49?) (viktors@berstis.com@63.230.168.74) by mymail.myregisteredsite.com with ESMTPA; 3 May 2019 15:56:53 -0000 References: <25feaf25-6611-c8f8-e191-30230841f36f@cs.ucla.edu> <5992c605-f6ba-7133-f339-031c7cafea2c@berstis.com> <4564787.RE4qx4JxAx@kdudka-nb> From: Viktors Berstis Message-ID: Date: Fri, 3 May 2019 08:56:35 -0700 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 MIME-Version: 1.0 In-Reply-To: <4564787.RE4qx4JxAx@kdudka-nb> Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I don't think the problem has anything to do with sorting or -U1. When ls is taking over 5 minutes for something that should run in a couple of seconds, the task manager shows that it is using nearly [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [64.69.218.93 listed in list.dnswl.org] 0.0 HTML_MESSAGE BODY: HTML included in message 1.1 MIME_HTML_ONLY BODY: Message only has text/html MIME parts X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) I don't think the problem has anything to do with sorting or -U1.  When ls is taking over 5 minutes for something that should run in a couple of seconds, the task manager shows that it is using nearly no CPU.... it is doing a lot of  "other I/O".

It doesn't look like the build you referenced is designed to be compileable for Windows.  Is there one that is?  Thanks.
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v7.5~49

 
- Viktors Berstis
Kamil Dudka wrote:
On Friday, May 3, 2019 5:43:20 AM CEST Viktors Berstis wrote:
I downloaded it from
https://sourceforge.net/projects/gnuwin32/files/coreutils/5.3.0/coreutils-5.
3.0.exe/download The help said "Report bugs to <bug-coreutils@gnu.org>"
which is what I did. The build is so old that I suspect none of the
original players are around. Do you know of a windows binary or windows
source that is newer
anywhere?  Thanks.

- Viktors Berstis
`ls -U1` will not run significantly faster than `ls` on powerful hardware.  
The key difference is that `ls -U1` prints the results continuously as the 
list of files is read from file system whereas `ls` will be silent until
the complete list is read.  You need to use a new enough version of coreutils 
for this to work properly.  This optimisation was introduced in coreutils-7.5:

https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v7.0~113
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=v7.5~49

Kamil

Paul Eggert wrote:
On 5/2/19 5:41 PM, Viktors Berstis wrote:
The newer version of "ls" built for Windows has the problem.
Ah, then you'll have to talk to whoever built that version, which is not
me (and generally speaking they don't hang out on this mailing list).



From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: kdudka@redhat.com, 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155690000024905 (code B ref 35531); Fri, 03 May 2019 16:14:02 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 16:13:20 +0000 Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMaoK-0006Tc-4W for submit@debbugs.gnu.org; Fri, 03 May 2019 12:13:20 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMaoG-0006TM-9O for 35531@debbugs.gnu.org; Fri, 03 May 2019 12:13:18 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D691D161883; Fri, 3 May 2019 09:13:09 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id nexkR9WCIJCx; Fri, 3 May 2019 09:13:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E664A161927; Fri, 3 May 2019 09:13:08 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XDMNh5Cx4DYt; Fri, 3 May 2019 09:13:08 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CB05E16183B; Fri, 3 May 2019 09:13:08 -0700 (PDT) References: <25feaf25-6611-c8f8-e191-30230841f36f@cs.ucla.edu> <5992c605-f6ba-7133-f339-031c7cafea2c@berstis.com> From: Paul Eggert Openpgp: preference=signencrypt Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= xsFNBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ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zYxhH/tJhbDdHrqHH767jaDaTB1+Talp/2AMKwc XNOdiklGxbmHVG6YGl6g8Lrbsu9NZEI4yLlHzuikthJWgz+3vZhVGyNlt+HNIoF6CjDL2omu 5cEq4RDHM44QqPk6l7O0pUvN1mT4B+S1b08RKpqm/ff015E37HNV/piIvJlxGAYz8PSfuGCB 1thMYqlmgdhd9/BabGFbGGYHA6U4/T5zqU+f6xHy1SsAQZ1MSKlLwekBIT+4/cLRGqCHjnV0 q5H/T6a7t5mPkbzSrOLSo4puj+IToNjYyYIDBWzhlA19avOa+rvUjmHtD3sFN7cXWtkGoi8b uNcby4U= Organization: UCLA Computer Science Department Message-ID: Date: Fri, 3 May 2019 09:13:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <5992c605-f6ba-7133-f339-031c7cafea2c@berstis.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 5/2/19 8:43 PM, Viktors Berstis wrote: > I downloaded it from > https://sourceforge.net/projects/gnuwin32/files/coreutils/5.3.0/coreutils-5.3.0.exe/download > > The help said "Report bugs to " which is what I > did. Whoever built it just copied that line from upstream. If the build has MS-Windows-specific problems, you'll need to find an MS-Windows person somewhere who can fix it, or find a better build somewhere. This bug-reporting system is not the best place to do that; see: https://www.gnu.org/prep/standards/html_node/System-Portability.html and look for "Windows". From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Kamil Dudka Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 03 May 2019 16:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: Paul Eggert , 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155690065025909 (code B ref 35531); Fri, 03 May 2019 16:25:01 +0000 Received: (at 35531) by debbugs.gnu.org; 3 May 2019 16:24:10 +0000 Received: from localhost ([127.0.0.1]:49404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMayo-0006jp-3p for submit@debbugs.gnu.org; Fri, 03 May 2019 12:24:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMaym-0006jb-Ig for 35531@debbugs.gnu.org; Fri, 03 May 2019 12:24:09 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A8E4CC05569A; Fri, 3 May 2019 16:24:02 +0000 (UTC) Received: from kdudka-nb.localnet (unknown [10.43.2.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id E711519C4F; Fri, 3 May 2019 16:24:01 +0000 (UTC) From: Kamil Dudka Date: Fri, 03 May 2019 18:24:09 +0200 Message-ID: <2524810.3rP0ZgnUe3@kdudka-nb> In-Reply-To: References: <4564787.RE4qx4JxAx@kdudka-nb> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 03 May 2019 16:24:02 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) On Friday, May 3, 2019 5:56:35 PM CEST Viktors Berstis wrote: > I don't think the problem has anything to do with sorting or -U1. It was unclear what you meant by "the problem" so I pointed out the only inefficiency that was immediately obvious to me. > When ls is taking over 5 minutes for something that should run in a > couple of seconds, the task manager shows that it is using nearly no > CPU.... it is doing a lot of "other I/O". You can try to use some profiling/tracing tools to debug the root cause. > It doesn't look like the build you referenced is designed to be > compileable for Windows. Is there one that is? Thanks. I would suggest to build the latest upstream release (coreutils-8.31 now) from: https://www.gnu.org/software/coreutils/ Kamil From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: Peter Edwards Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 04 May 2019 01:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 35531@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15569318788483 (code B ref -1); Sat, 04 May 2019 01:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2019 01:04:38 +0000 Received: from localhost ([127.0.0.1]:49998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMj6T-0002Ck-K5 for submit@debbugs.gnu.org; Fri, 03 May 2019 21:04:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMiV3-0001KI-VU for submit@debbugs.gnu.org; Fri, 03 May 2019 20:25:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:39832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMiUy-0007dv-S4 for submit@debbugs.gnu.org; Fri, 03 May 2019 20:25:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMiUx-0001Ss-Pr for bug-coreutils@gnu.org; Fri, 03 May 2019 20:25:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMiUw-0007Zo-Mo for bug-coreutils@gnu.org; Fri, 03 May 2019 20:25:51 -0400 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:50990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMiUw-0007HT-Ac for bug-coreutils@gnu.org; Fri, 03 May 2019 20:25:50 -0400 Received: from dirk.local (unknown [210.49.73.51]) (Authenticated sender: no-spam@optusnet.com.au) by mail105.syd.optusnet.com.au (Postfix) with ESMTPSA id 9043E105E8CC; Sat, 4 May 2019 10:01:41 +1000 (AEST) References: From: Peter Edwards Message-ID: <22bea99b-ca62-4220-85d9-d61a3b8e6451@optusnet.com.au> Date: Sat, 4 May 2019 10:01:40 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=P6RKvmIu c=1 sm=1 tr=0 cx=a_idp_d a=SvVb87x/VpLU+SZzNqbJAA==:117 a=SvVb87x/VpLU+SZzNqbJAA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=cqvmlmxeAAAA:8 a=G0q3-D0nY_jToNyeyYgA:9 a=QEXdDO2ut3YA:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 211.29.132.249 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.6 (-) X-Mailman-Approved-At: Fri, 03 May 2019 21:04:36 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hi Although this bug report seems to be a problem with the windows port of ls, it reminded me of an interesting investigation into slow ls speeds due to colorizing via the LS_COLORS environment variable. See https://news.sherlock.stanford.edu/posts/when-setting-an-environment-variable-gives-you-a-40-x-speedup I thought it an interesting case study. Regards - PSDE From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: L A Walsh Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 04 May 2019 05:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Viktors Berstis Cc: 35531@debbugs.gnu.org X-Debbugs-Original-Cc: Coreutils Received: via spool by submit@debbugs.gnu.org id=B.1556947644345 (code B ref -1); Sat, 04 May 2019 05:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2019 05:27:24 +0000 Received: from localhost ([127.0.0.1]:50189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMnCi-00005Q-0Z for submit@debbugs.gnu.org; Sat, 04 May 2019 01:27:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMnCg-00005E-BC for submit@debbugs.gnu.org; Sat, 04 May 2019 01:27:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:48293) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMnCa-00056p-Cy for submit@debbugs.gnu.org; Sat, 04 May 2019 01:27:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMnCZ-0001p9-9X for bug-coreutils@gnu.org; Sat, 04 May 2019 01:27:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMnCW-00055k-KA for bug-coreutils@gnu.org; Sat, 04 May 2019 01:27:11 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:49556 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hMnCV-00054o-GS for bug-coreutils@gnu.org; Sat, 04 May 2019 01:27:07 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x445QTiQ045532; Fri, 3 May 2019 22:26:32 -0700 Message-ID: <5CCD2285.4010005@tlinx.org> Date: Fri, 03 May 2019 22:26:29 -0700 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 173.164.175.65 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 5/1/2019 3:03 PM, Viktors Berstis wrote: > When running "ls" or "ls -U" on a windows directory containing 50000 > files, ls takes forever. Something seems to be highly inefficient in there. > --- it sounds like you are running ls with no options (nothing in environment and no switches on the command line). Is this the case? If is, I'm stumped unless whoever compiled that had it set to do some things by default. Basically on Windows, anything that you might get away with on linux with a stat call, takes an 'open' call on windows. That gets costly. Anything that appends a classifyer to the end of the file (like ls -F, --classify or --file-type) or that would display any of the data or size information (ls -l would be right out!). The only thing 'ls' could display without such a penalty is the file name. However that only apply to stock ls, and since we don't know what options might have been enabled for that 'ls' (including any default usage of switches such as those mentioned above), it's hard to say exactly what the problem is. A suggestion -- try installing a minimal snapshot of 'Cygwin' ('cygwin.org') and try env -i /bin/ls on cygwin's command line in that directory and see how fast that is. If it is slow, then something excessively weird is going on that is the wonder of a closed source Windows. However, my hunch would have it be 'fast', but since I don't know the cause, can't say if that would help or not. One further possibility that I'd think unlikely: the directory could be very fragmented and take a long time to (5minutes?! really unlikely, almost has to be the missing stat call) read...though the figures you are stating sound out of bounds for a fragmented directory. Still, if you grab the 'contig' tool from the sysinternals site (a windows subsite), it can show you the number of fragments a file is split into -- and can be used on directories: /prog/Sysinternals/cmd> contig -a -v . Contig v1.6 - Makes files contiguous Copyright (C) 1998-2010 Mark Russinovich Sysinternals - www.sysinternals.com ------------------------ Processing C:\prog\Sysinternals\cmd: Scanning file... Cluster: Length 0: 3 File size: 12288 bytes C:\prog\Sysinternals\cmd is in 1 fragment ------------------------ Summary: Number of files processed : 1 Average fragmentation : 1 frags/file ======== Other than those options, not sure what else to suggest to narrow it down, but thought i'd at least mention a few possibilities. Good luck! From unknown Fri Jun 13 10:34:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35531: problem with ls in coreutils Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 10 May 2019 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35531 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Peter Edwards , 35531@debbugs.gnu.org Received: via spool by 35531-submit@debbugs.gnu.org id=B35531.155748314313010 (code B ref 35531); Fri, 10 May 2019 10:13:01 +0000 Received: (at 35531) by debbugs.gnu.org; 10 May 2019 10:12:23 +0000 Received: from localhost ([127.0.0.1]:37212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP2Vq-0003Nk-LX for submit@debbugs.gnu.org; Fri, 10 May 2019 06:12:22 -0400 Received: from mail.magicbluesmoke.com ([82.195.144.49]:45144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hP2Vo-0003NX-8f; Fri, 10 May 2019 06:12:20 -0400 Received: from localhost.localdomain (unknown [109.78.242.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.magicbluesmoke.com (Postfix) with ESMTPSA id C6A42AD8A; Fri, 10 May 2019 11:12:18 +0100 (IST) References: <22bea99b-ca62-4220-85d9-d61a3b8e6451@optusnet.com.au> From: =?UTF-8?Q?P=C3=A1draig?= Brady Message-ID: Date: Fri, 10 May 2019 03:12:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <22bea99b-ca62-4220-85d9-d61a3b8e6451@optusnet.com.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tag 35531 notabug close 35531 stop On 03/05/19 17:01, Peter Edwards wrote: > Hi > > Although this bug report seems to be a problem with the windows port > of ls, it reminded me of an interesting investigation into slow ls > speeds due to colorizing via the LS_COLORS environment variable. > > See > https://news.sherlock.stanford.edu/posts/when-setting-an-environment-variable-gives-you-a-40-x-speedup > > I thought it an interesting case study. Thanks for the info. In summary, to speed up ls color induced processing significantly, disable stat() and getxattr() calls with: LS_COLORS='ex=00:su=00:sg=00:ca=00:' A general point though is that colors are for human processing, and how fast can one process the output from ls :) I.E. if ls is being written to pipe/file or somewhere where speed may be important, the coloring is disabled by default anyway. cheers, Pádraig