News for hackers. Stuff that matters.
Re:Exa - A Modern Replacement for ls by xxpor on Sunday December 19, 2021 @02:43PM (#29617534)
I'm willing to bet it's the fact that they're in a git repo. exa checks git status iirc, and of course ls doesn't. I'll try to repro it.

Edit:

Hmm, interesting. Certainly a lot slower, but not enough that I'd really notice unless I was doing this constantly:

time ls

real 0m0.228s

user 0m0.145s

sys 0m0.082s

time exa

real 0m1.209s

user 0m1.124s

sys 0m0.084s

Re:Exa - A Modern Replacement for ls by esprehn on Sunday December 19, 2021 @03:03PM (#29617765)
Yeah at first I thought maybe the git feature but in the demo they're not passing --git. See also: https://github.com/ogham/exa/issues/367#issuecomment-4285909...

ls taking seconds and exa taking 13 minutes :(

Their website says it's as fast as ls because they do things in parallel but it doesn't seem to actually be as fast as ls in small or large usage.

I'd also say 200ms -> 1.2 seconds is very noticable.

Re:Exa - A Modern Replacement for ls by xxpor on Sunday December 19, 2021 @05:39PM (#29619233)
Based on perf report, the latest stable version of exa is spending >99% of its time doing grid stuff. I pulled the repo from git, and using the latest master commit, it appears to have a huristic to not bother with the grid when you have lots of files. Now the times are a lot closer. (redirected stdout to /dev/null since otherwise the vast majority of the time would simply be outputting to the shell)

    [user@anarchy:~/exa_test]$ time ../exa/target/release/exa >/dev/null                                                                                                                                                                                                      
    ../exa/target/release/exa > /dev/null  0.05s user 0.07s system 99% cpu 0.122 total
    [user@anarchy:~/exa_test]$ time /bin/ls >/dev/null                                                                                                                                                                                                                        
    /bin/ls > /dev/null  0.03s user 0.01s system 99% cpu 0.048 total
Re:Exa - A Modern Replacement for ls by lilyball on Sunday December 19, 2021 @03:27PM (#29617992)
Exa does colors and other stuff by default. I would wager it’s stat()ing every file and ls isn’t.
Re:Exa - A Modern Replacement for ls by xxpor on Sunday December 19, 2021 @05:16PM (#29619008)
>I'd also say 200ms -> 1.2 seconds is very noticable.

One of those things that if I'm looking for it, I'd notice but otherwise...

I deal with so many slow CLI tools daily that it wouldn't even register.