emacs-devel
[Top][All Lists]
Advanced

[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 15:40:51 +0000

Eli Zaretskii <eliz@gnu.org> writes:

> My point is that when you call an expensive calculation inside
> while-no-input, you are entirely at the mercy of the code run by the
> body of while-no-input, wrt how soon after a keypress will
> while-no-input be interrupted.  And since Michael was asking precisely
> about such situations, I commented that it _might_ make Emacs less
> responsive.

I'd say that the chances are slim. Primitives like `funcall_lambda',
`if', and `when' are all calling `maybe_quit'. So, pretty much any Lisp
code will trigger interruption.

The exceptions are subroutines and external library calls, but most of
the subroutines are also sparkled with maybe_quit.

I think that it is a reasonable assumption that Emacs will not block
inside `while-no-input' in the overwhelming majority of real-world
scenarios. Exceptions are possible, but should not be a blocker - few
exceptions are much better with the current stable inflow of font-lock
performance complaints that are coming from inefficient or buggy
font-lock code in third-party packages.

-- 
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]