Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.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