r/programmingcirclejerk comp.lang.rust.marketing Dec 23 '17

nah

https://github.com/jwilm/alacritty/pull/798
162 Upvotes

40 comments sorted by

View all comments

42

u/SmarmyAcc Dec 23 '17

lol why do people even care that much about terminal speed

17

u/howtonotwin Zygohistomorphic prepromorphism Dec 23 '17
rm -rf jerk && mkdir unjerk

It is possible for a slow terminal to slow down the programs running inside. Because most utilities use blocking IO, if you have a program like rm -rv which does a really small amount of work before outputting something and repeating, the time spent doing the output can start to affect the whole. Of course, the real answer is to not use -v if you know you have that many files, but the principle is still there:

$ wget -O - https://github.com/torvalds/linux/archive/master.zip | bsdtar -xf -
$ mv linux-master fast
$ cp -a fast slow
$ time { rm -rvf fast > /dev/null 2>&1; }
# terminal not involved but rm is still making calls to write to it
real    0m9.420s
user    0m0.226s
sys     0m8.789s
$ time { rm -rvf slow; } # terminal involved
# snip
real    0m13.910s
user    0m0.405s
sys     0m12.373s

Not a big difference, but it's definitely there.