I am running an interactive program that outputs about 10 MB [edit: probably closer to 100 MB actually] of ASCII text. The performance within emacs shell-mode (Aquamacs) is unacceptably slow, requiring hours to do this. I did execute buffer-disable-undo which speeds things up a bit, but it is still too slow.
I tried running the program with the buffer window hidden, but the program finished and when I reselected the buffer, I still have to wait hours for the output to spool.
Is there some command I can give emacs to make performance acceptable? I don't understand how it is even possible for shell-mode to be this slow: this is a 32 GB multicore machine with 64-bit modern multicore CPUs and SSD.
Set the variables
comint-move-point-for-output
andcomint-scroll-show-maximum-output
tonil
. This prevents the buffer from continuously scrolling to the end of the output, which requires frequent redisplays.