These problems should be solved, please cvs up and try again and let me know. There is a little more to come but what is there now should reduce an idle tmux to a few gettimeofday every half second.
-------- Original message -------- From: Ted Unangst <[email protected]> Date:28/08/2015 17:49 (GMT+00:00) To: [email protected] Cc: [email protected] Subject: tmux uses too much cpu This has already been briefly discussed, but for the record here's my complete report. Even idle tmux servers without clients use an unexpected amount of CPU. Start a tmux, create a few windows inside, leave them idling at the shell, detach. Leave it overnight and when you come back in the morning, the tmux process has accumulated a fair bit of CPU time. On slower hardware, even while it appears to be doing nothing in top, it eats something like 3-5% or more over the long haul. ktrace reveals that it's doing a wakeup every half second to stat and probe each terminal and process group. My opinion is that while the status bar updates are cool when I'm watching, if there's nobody attached this is wasted effort. There are also a huge number of gettimeofday() and clock_gettime() calls each wakeup. Not sure if this is tmux or libevent, but from the outside it looks like there are multiple timer systems running without much coordination.
