colorls: Colorls slow

It is normal that colorls is much slower than ls?

screenshot 2019-02-24 at 13 10 01

There is a noticable lag compared to ls which is in everyday use is pretty frustrating.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19

Most upvoted comments

time ls -l

0,00s user 0,00s system 62% cpu 0,004 total

Updating from the default OSX ruby version 2.3 to 2.6.5 results into

colorls --gs --sd -l 0,10s user 0,03s system 95% cpu 0,135 total

Of course, it is a bit unfair to compare using the --gs option, as this needs to call out to git which adds to the overall time spend.

Not that much better than before, but it feels a lil snappier.

Still there might be room for optimisation?

Probably not. At least not from colorls; you would have to wait for Ruby optimizations in a new release.

Out of this reason, I started my own “color ls” which is already mostly compatible with colorls but faster since it is compiled to native code. I am using it on a daily basis, but it’s still a bit rough around the edges.