From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#23002: 25.0.92; sluggish M-x Date: Wed, 16 Mar 2016 08:52:11 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83io0qfjie.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1458086001 15077 80.91.229.3 (15 Mar 2016 23:53:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2016 23:53:21 +0000 (UTC) Cc: 23002@debbugs.gnu.org, Leo Liu To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 16 00:53:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1afyly-0005lz-4n for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Mar 2016 00:53:10 +0100 Original-Received: from localhost ([::1]:52150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afylx-0006Pl-KV for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2016 19:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afylu-0006Ns-M9 for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 19:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afylq-0003Up-L1 for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 19:53:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afylq-0003Uk-HJ for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 19:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1afylq-0001Da-Cb for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 19:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Mar 2016 23:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23002 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23002-submit@debbugs.gnu.org id=B23002.14580859374618 (code B ref 23002); Tue, 15 Mar 2016 23:53:02 +0000 Original-Received: (at 23002) by debbugs.gnu.org; 15 Mar 2016 23:52:17 +0000 Original-Received: from localhost ([127.0.0.1]:49543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afyl7-0001CP-CQ for submit@debbugs.gnu.org; Tue, 15 Mar 2016 19:52:17 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:50594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afyl4-0001CF-Oc for 23002@debbugs.gnu.org; Tue, 15 Mar 2016 19:52:15 -0400 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 90F22C055D; Wed, 16 Mar 2016 08:52:11 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114962 Archived-At: >>>>> On Tue, 15 Mar 2016 10:21:36 -0400, Stefan Monnier said: >> 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. At least, not in a responsive way. I first tried to shorten the polling interval in start_polling if Vthrow_on_input is non-nil. But let-binding throw-on-input as in the definition of while-no-input was not enough and we would need some explicit function call to activate start_polling. >> + ;; 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). Indeed. (if use-polling (input-pending-p)) does work. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp