4 ms·
I've always assumed something like the above is slow due to the terminal blocking the program to perform updates to the display. Whereas a status indicator isn
by josho 11y ago
I've always assumed something like the above is slow due to the terminal blocking the program to perform updates to the display.
Whereas a status indicator isn't exactly pushing much data to the terminal. So, It shouldn't impact run time.
- clebio 11y agoYes, that's a reasonable assumption. I am by no means a terminal guru, but my understanding is that, for something like a progress bar or spinner (anything that is updated in-place in the terminal), the entire "screen" is being redrawn on update.
- clebio 11y agoI also suspect (though have not verified) that any output to terminal is quite a bit slower than the raw operation -- that sort of difference that we should all know, as programmers. http://norvig.com/21-days.html#answers http://norvig.com/21-days.html#answers