unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: allenhw1996@gmail.com, 60810@debbugs.gnu.org
Subject: bug#60810: 30.0.50; `while-no-input' in GUI(macOS) is much slower than emacs -nw
Date: Sun, 15 Jan 2023 09:08:17 +0200	[thread overview]
Message-ID: <83358c6zry.fsf@gnu.org> (raw)
In-Reply-To: <87bkn0bmuf.fsf@yahoo.com> (bug-gnu-emacs@gnu.org)

> Cc: 60810@debbugs.gnu.org
> Date: Sun, 15 Jan 2023 09:36:24 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Thanks.  This problem is because the NS port does not support
> interrupt-based input, because of limitations in Apple's toolkit.
> 
> This means Emacs is not notified immediately about new input while it is
> executing Lisp, and instead has to periodically check every 1 second.

Does NS use a separate thread to handle input events?  If so, could
that separate thread set quit-flag when we are under throw-on-input,
if it detects a suitable input event?  The w32 port does that, see
signal_user_input in w32fns.c.  This should allow the Lisp thread
detect that input is pending in a more timely fashion.





  reply	other threads:[~2023-01-15  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14  8:07 bug#60810: 30.0.50; `while-no-input' in GUI(macOS) is much slower than emacs -nw Allen Wang
2023-01-15  1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-15  7:08   ` Eli Zaretskii [this message]
2023-01-15  9:41     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-15 20:48       ` Allen Wang

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=83358c6zry.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60810@debbugs.gnu.org \
    --cc=allenhw1996@gmail.com \
    --cc=luangruo@yahoo.com \
    /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).