Re: How to speed up comint for large outputs?

Stefan Monnier via Users list for the GNU Emacs text editor <[email protected]> Thu, 02 Jul 2026 14:18:26 -0400
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
Michael Heerdegen [2026-07-02 02:46:43] wrote:
> "Jae Juang" <[email protected]> writes:
>> I frequently make use of comint and SQL. When exploring databases, one
>> occasionally stumbles into unexpectedly large datasets. and this slows
>> emacs into molasses. How do people deal with this? Emacs itself has no
>> issue with large files; is there some method to have emacs batch the
>> comint outputs before displaying them, and presumably dying in
>> fontlock?
>
> Have you tried to use profiler.el to find out what exactly slows down Emacs that
> badly?

My guess it's the subprocess outputting very long lines.  IIRC we've had
some attempts to accommodate such situations by refraining from
font-locking the last (non-EOF terminated) line of the buffer, so as to
avoid re-font-locking the whole line every time the subprocess outputs
another chunk of that line.


=== Stefan