Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fast emacs shell-mode?

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.

like image 340
kdog Avatar asked Nov 18 '14 02:11

kdog


2 Answers

Set the variables comint-move-point-for-output and comint-scroll-show-maximum-output to nil. This prevents the buffer from continuously scrolling to the end of the output, which requires frequent redisplays.

like image 136
Barmar Avatar answered Sep 19 '22 05:09

Barmar


Is your interactive program running within shell mode as a shell script?

Would it be possible to fork the shell process directly to a shell (not shell mode within emacs), then have emacs just load the results on completion?

like image 38
Chris McMahan Avatar answered Sep 20 '22 05:09

Chris McMahan