From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: michael_heerdegen@web.de, emacs-devel@gnu.org
Subject: Re: Partly deferred font-locking?
Date: Thu, 12 Jan 2023 15:40:51 +0000 [thread overview]
Message-ID: <87fscf92ws.fsf@localhost> (raw)
In-Reply-To: <834jsvbxdy.fsf@gnu.org>
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>
next prev parent reply other threads:[~2023-01-12 15:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 17:15 Partly deferred font-locking? Michael Heerdegen
2023-01-11 17:43 ` [External] : " Drew Adams
2023-01-11 18:33 ` Michael Heerdegen
2023-01-11 18:38 ` Drew Adams
2023-01-11 18:49 ` Drew Adams
2023-01-11 19:31 ` Michael Heerdegen
2023-01-11 17:45 ` Eli Zaretskii
2023-01-11 18:36 ` Michael Heerdegen
2023-01-11 19:58 ` Eli Zaretskii
2023-01-12 13:14 ` Michael Heerdegen
2023-01-12 13:45 ` Eli Zaretskii
2023-01-12 14:00 ` Michael Heerdegen
2023-01-12 14:13 ` Eli Zaretskii
2023-01-12 14:26 ` Ihor Radchenko
2023-01-12 14:30 ` Ihor Radchenko
2023-01-12 14:36 ` Eli Zaretskii
2023-01-12 14:44 ` Ihor Radchenko
2023-01-12 15:11 ` Eli Zaretskii
2023-01-12 15:40 ` Ihor Radchenko [this message]
2023-01-12 14:30 ` Eli Zaretskii
2023-01-12 14:36 ` Ihor Radchenko
2023-01-12 14:38 ` Michael Heerdegen
2023-01-12 14:33 ` Michael Heerdegen
2023-01-12 15:51 ` Eli Zaretskii
2023-01-12 16:02 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fscf92ws.fsf@localhost \
--to=yantar92@posteo.net \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).