Subject: term is very slow

From: Akib Azmain Turja <[email-masked]>
Date: Mon, 28 Nov 2022 02:00:29 +0600

Term mode is very slow.  On my computer, Coterm is 2-3x faster than
term, and my own terminal emulator, Eat, is 4-5x faster.

I tried to profile Term.  Steps:

1. emacs -Q (+ -nw, environment variable DISPLAY was unset)
2. M-x profiler-start RET cpu+mem RET
3. M-x term
4. Run the following stupid command:
   timeout 1 bash -c 'i=0 ; while true ; do echo $i ; i=$((i+1)) ; done'
   Note I also run emacs -nw in before this command.
5. Wait for finishing.
6. M-x profiler-stop
7. M-x profiler-report

Here are the reports (attached), but don't seem to be human readable:

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: [email-masked]
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."