From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#23002: 25.0.92; sluggish M-x Date: Tue, 15 Mar 2016 10:21:36 -0400 Message-ID: References: <83io0qfjie.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458051746 923 80.91.229.3 (15 Mar 2016 14:22:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2016 14:22:26 +0000 (UTC) Cc: Leo Liu , 23002@debbugs.gnu.org To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 15 15:22:17 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 1afprU-0002U5-Ic for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2016 15:22:16 +0100 Original-Received: from localhost ([::1]:48522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afprU-00028w-2S for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Mar 2016 10:22:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afprL-000218-DU for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 10:22:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afprF-0002Zo-OB for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 10:22:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afprF-0002Zf-LH for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 10:22:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1afprF-00046A-Go for bug-gnu-emacs@gnu.org; Tue, 15 Mar 2016 10:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Mar 2016 14:22:01 +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.145805170315730 (code B ref 23002); Tue, 15 Mar 2016 14:22:01 +0000 Original-Received: (at 23002) by debbugs.gnu.org; 15 Mar 2016 14:21:43 +0000 Original-Received: from localhost ([127.0.0.1]:49256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afpqx-00045e-ID for submit@debbugs.gnu.org; Tue, 15 Mar 2016 10:21:43 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afpqw-00045S-Fu for 23002@debbugs.gnu.org; Tue, 15 Mar 2016 10:21:42 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A2FgA731xV/wr0d0tcDoMChAKFVbtAhH6CTQQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQUBAQEBHos6hQUHhC0Fsz+BRSODOloigngBAQE X-IPAS-Result: A0A2FgA731xV/wr0d0tcDoMChAKFVbtAhH6CTQQCAoE8OxIBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQUBAQEBHos6hQUHhC0Fsz+BRSODOloigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="196267253" Original-Received: from 75-119-244-10.dsl.teksavvy.com (HELO pastel.home) ([75.119.244.10]) by ironport2-out.teksavvy.com with ESMTP; 15 Mar 2016 10:21:38 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A0D296142A; Tue, 15 Mar 2016 10:21:36 -0400 (EDT) In-Reply-To: (YAMAMOTO Mitsuharu's message of "Tue, 15 Mar 2016 17:14:46 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:114941 Archived-At: > 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