Score:1

Shell prompt in tmux session is much slower and sluggish

ca flag

Why is it that in shell prompt in a tmux session, it is significantly slower and sluggish than plainly in terminal with bash? Even for just having a new line of prompt, i.e. hit Enter to execute current command line?

Artur Meinild avatar
vn flag
I'm not experiencing that issue myself, so I have no clue.
mchid avatar
bo flag
I don't think I'm having this issue but I will say that it does usually take longer to initially load `screen` or `tmux` compared to simply loading bash but that's because it has to initially load both `screen` or `tmux` and then load `bash`.
mchid avatar
bo flag
[This thread](https://github.com/tmux/tmux/issues/3352#issuecomment-1280147570) seems to explain some of it and it may have to do with your scrollback limit or lack thereof.
mchid avatar
bo flag
[More discussion here](https://www.reddit.com/r/linux/comments/5ovfgz/tmux_really_slows_down_the_terminal_performance_a/). It looks like `tmux` is slower than `screen` although `screen` might take some getting used to.
Score:0
vn flag

There are several documented cases (here and here) where tmux is evidently slower than a raw terminal.

1. When printing a large amount of output

It seems tmux uses more time to print a very large number of characters to the screen. This test was done to show this (with comparison to GNU screen:

  $ time cat /usr/share/dict/words
  real  0m0.159s
  user  0m0.002s
  sys   0m0.154s

  $ tmux
  $ time cat /usr/share/dict/words
  real    0m2.044s
  user    0m0.000s
  sys     0m0.253s

  $ screen
  $ time cat /usr/share/dict/words
  real    0m0.808s
  user    0m0.001s
  sys     0m0.252s

2. When the scrollback buffer is too large

It's also evident that if your history-limit option is set too high, it will cause a slowdown in tmux. The default history-limit in tmux is 2000 lines. It should be safe to set this considerably higher, but if you exceed 1 million lines, it appears to have a noticeable effect.

The history limit can be set with this option in ~/.tmux.conf:

set-option -g history-limit 10000
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.