all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: Leo Liu <sdl.web@gmail.com>, 23002@debbugs.gnu.org
Subject: bug#23002: 25.0.92; sluggish M-x
Date: Tue, 15 Mar 2016 10:21:36 -0400	[thread overview]
Message-ID: <jwvpouv7rsw.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <wly49kb1jd.wl%mituharu@math.s.chiba-u.ac.jp> (YAMAMOTO Mitsuharu's message of "Tue, 15 Mar 2016 17:14:46 +0900")

> However, the sluggishness during the evaluation of
> execute-extended-command--shorter is common to the both ports on OS X,
> or non-interrupt-driven systems that use polling with SIGALRM for
> quit/while-no-input handling, in general.  I'm thinkng about applying
> the following patch to the Mac port, but it might also be useful for
> other systems.

Hmm... this seems to indicate that while-no-input is just not really
working in those systems.

> +      ;; On non-interrupt-driven systems, while-no-input polls for
> +      ;; input every `polling-period' (default 2) seconds, and that is
> +      ;; not frequent enough.  So we call input-pending-p manually.
> +      (if (and use-polling (input-pending-p))
> +          (signal 'quit nil))

Hmm... I'm not sure I understand: if input-pending-p returns non-nil,
why are we still in this loop?

IOW, I get the impression that the above call to input-pending-p will
end up triggering a kind of "poll" to fetch new input, so we should be
able to arrange for this fetching to trigger whatever should normally be
triggered by incoming input (e.g. getting out of the while-no-input
loop), so we could just reduce the above 2 lines to a single call to
`input-pending-p'.
I understand this may not seem like a big progress, but "every bit
counts" ;-) tho more seriously, I'm asking this mostly to better
understand what's going on (but also because I get the impression that
(signal 'quit nil) is not always the right thing to do).


        Stefan





  parent reply	other threads:[~2016-03-15 14:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-13  4:01 bug#23002: 25.0.92; sluggish M-x Leo Liu
2016-03-13 16:03 ` Drew Adams
2016-03-13 16:08 ` Eli Zaretskii
2016-03-14  4:21   ` Leo Liu
2016-03-15  8:14     ` YAMAMOTO Mitsuharu
2016-03-15 11:10       ` Leo Liu
2016-03-15 14:21       ` Stefan Monnier [this message]
2016-03-15 23:52         ` YAMAMOTO Mitsuharu
2016-03-16  1:31           ` Stefan Monnier
2016-03-20  9:10             ` Leo Liu
2016-12-25  6:48               ` Leo Liu
2020-09-05 14:08                 ` Lars Ingebrigtsen
2020-10-07  3:45                   ` Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpouv7rsw.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=23002@debbugs.gnu.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    --cc=sdl.web@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.