4 ms·
What is the speed like? Ruby isn't exactly known for being the fastest.
by spork12 9y ago
What is the speed like? Ruby isn't exactly known for being the fastest.
- alekratz 9y agodisclaimer: I'm not using the fonts, but it attempts to render them anyway. Here's what `time ls` and `time lc` produced, in a directory with 517 files: > ls --color=tty -l 0.01s user 0.00s system 93% cpu 0.007 total > ~/.gem/ruby/2.4.0/bin/lc 0.14s user 0.01s system 98% cpu 0.159 total It's definitely noticeable, especially if you use `ls` day-in, day-out. But it's nothing debilitating.
- pmontra 9y agoProbably it could be made faster by working a little with InstructionSequence https://ruby-doc.org/core-2.4.1/RubyVM/InstructionSequence.html https://ruby-doc.org/core-2.4.1/RubyVM/InstructionSequence.h... and creating a "compiled" file to save the parsing time. I played with it on the day they released Ruby 2.3. It's not meant for distributing code across machines and it could fail on the same machine after some updates. It's probably not worth it to shave 152 ms on an interactive command.
- xanderstrike 9y agoThe fonts don't seem to matter. This thing is super cool but I disagree that it's not debilitating. `ls` on my home directory takes 0.005 real, `colorls` takes 0.554 real. Over 100x as long and it's an extremely noticeable half second.
- mnarayan01 9y agoSince you're presumably intending to at least glance at all the output, it's hard to imagine speed being a limiting factor here. Also internal bookkeeping done by the terminal is probably going to limit how much command speed matter, e.g. word/line wrapping: https://stackoverflow.com/questions/21947452/why-is-printing-b-dramatically-slower-than-printing https://stackoverflow.com/questions/21947452/why-is-printing...
- izacus 9y agoThat is kinda true... but I did notice that once you have a few of such extensions, terminal can get perceivably laggy and slow. If the tools startup / load time is slow, it can make command-line feel unresponsive.
- KirinDave 9y agoIf powerline doesn't slow people down, I'm pretty sure the 10ms Ruby invocation time is equally fine.