[Top][All Lists]

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

Re: Partly deferred font-locking?

From: Ihor Radchenko
Subject: Re: Partly deferred font-locking?
Date: Thu, 12 Jan 2023 14:36:11 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> More complex fontification may stumble on _editing_ long lines - if
>> fontification is performed line-by-line, long lines can slow down the
>> performance significantly (which is a known problem). It is often
>> a reasonable trade-off to defer re-fontification while editing a long
>> line and re-fontify it later. I have stumbled upon this issue myself in
>> my parser-based fontification for Org.
> It's a trade-off: you assume that users don't want to see the
> fontifications change in near real-time when editing long lines, but
> that is just an assumption, not necessarily true.

You are right. However, I am pretty sure that many users will prefer
having font-lock stop ongoing fontification when they try to enter key
sequence. Or, at least, when they try to enter a key and fontification
is taking more than something like `jit-lock-non-stealth-time' variable
(defaulting to ~0.1 sec).

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

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