Hacker News new | ask | show | jobs
by tuananh 4782 days ago
i just tried fish. out of the box experience is great. not digging much yet but so far, so good. much faster start up time than zsh. this is 2013 already and i seriously dont' want a shell takes up a second or 2 to fire up.
2 comments

I just tried fish and after half a minute declared it too slow: it is slow to complete (and not very good) and slow to print (or maybe slow to glob: "ls " takes far more time in fish than in bash or zsh).

I do not know if it has all I love in zsh (things like (.) or (om^/) or * or !$), but I would not trade zsh's completion for gaining 10% on startup time.

Current fish author here. Thanks for giving fish a try! I hope you tested a 2.0 branch build, and not the 1.x train from 2009 - a lot has changed since then, including major performance improvements. Check $FISH_VERSION if you are unsure.

'ls' is slower on fish because it passes the -G ("colorize”) flag to /bin/ls, which gives you nice colors, but requires a stat of each file to determine its type. If you want faster but uncolored output, you could redefine the ls function to invoke the ls command with no arguments:

    alias ls 'command ls'
For other instances of slowness or bad completions, we’d sure appreciate it if you opened an issue on the github page at http://github.com/fish-shell/fish-shell/issues/
I just checked and fish is way slower at 'ls *' than zsh. (zsh was done 2x as fast even with a directory with more than 3x as much stuff in it)

I have also a few other flags set in my zsh aliases that's not in fish.

(Tested with 2.0b2)

fish passes the -G flag to 'ls' by default, which produces colorized output, but stats each file. So fish is actually outputting more information than zsh, and what your test is really measuring is the speed of '/bin/ls' vs '/bin/ls -G'

To compare ls speeds for the same workload, run it directly: /bin/ls. I expect no difference, because it is the same binary.

If you wish to compare globbing speeds, do not use bare ls, which does more work in fish. Instead, invoke the ls binary: '/bin/ls * '. Or better yet, just echo: 'echo *'.

I have ls aliased to 'ls -F -H --color=yes --group-directories-first', so no.

('/bin/ls *' is just as fast with '--color=yes' for me btw)

I use zsh on my low-spec netbook and have not noticed slow startup times for my shell. That said, I do have a minimalist setup.

    FreeBSD
    DWM
    dmenu
that's probably because i use zsh with prezto (a fork of oh my zsh)