GNU bug report logs -
#35531
problem with ls in coreutils
Previous Next
Reported by: Viktors Berstis <cugnujm <at> berstis.com>
Date: Wed, 1 May 2019 22:53:01 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 6 years and 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.