top | item 42531664

(no title)

mike31fr | 1 year ago

Many people here seem impressed about speed/performance. I have been using all sorts of terminals / emulators over the past 20 years and it never occurred to me a terminal can be slow. When I type a command, I just get the result instantaneously, for any terminal. What are the use cases that can make a terminal be slow?

discuss

order

danhau|1 year ago

I don‘t get it either. The only use case I can see is for programs that output basically a video feed in text form.

A commenter in this thread mentioned sifting through log / debug output… but why wouldn‘t you pipe it to a file instead?

mike31fr|1 year ago

TESTED:

1. Create a file with 1 million lines:

  for i in {1..1000000}; do echo "Line $i: This is a test of terminal performance."; done > bigfile.txt
2. cat the file and see how much time it takes:

  time cat bigfile.txt
RESULTS:

- iterm2: 3.5s

- Default macOS terminal: 2.3s

- Ghostty: 1.8s

umvi|1 year ago

> What are the use cases that can make a terminal be slow?

Rendering huge stdout/stderr can be a bottleneck. Try running a program that writes half a million lines of text to stdout without file redirects and a lot of terminal emulators will struggle to keep up.

itsn0tm3|1 year ago

I think this mostly plays a role when using modal text editors like vim in your terminal. Speed matters so very much then! Give it a try if you want ;)

mike31fr|1 year ago

Have you ever experienced vim being slow? If so, would you know how I could reproduce this?