bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21077: 24.5; Slow printing in inferior python buffer with python-she


From: Stefan Monnier
Subject: bug#21077: 24.5; Slow printing in inferior python buffer with python-shell-enable-font-lock
Date: Thu, 30 Jul 2015 19:19:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Sorry for the delay in responding. I think a reasonable short term
> measure is to set python-shell-enable-font-lock to nil by default, and
> perhaps add a warning to the doc string to the effect that setting it
> to a non-nil value can dramatically slow down printing.

As mentioned, font-lock is but one of the parts of Emacs that slow down
as lines get longer.

In the case of comint modes, rather than disable font-lock we should
refrain from font-locking the text after the last \n (since that's the
line that keeps getting expanded, so we end up re-font-locking it O(N)
times for a line of length N, for a total amount of work of O(N^2)).
IIRC I have a similar hack in grep.el or compile.el.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]