From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#26525: `sit-for' in Flyspell slows typing down, hogs 90% of CPU Date: Mon, 17 Apr 2017 17:25:30 +0300 Message-ID: <83h91ndsbp.fsf@gnu.org> References: <48f694f6-7540-a57b-eb82-3fe5024d9554@gmail.com> <5fd6562f-6190-5c3c-34c1-24370e9937be@gmail.com> <83r30recae.fsf@gnu.org> <2c330c44-4919-7d2f-cb20-c9b72c9e8050@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1492439173 18256 195.159.176.226 (17 Apr 2017 14:26:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2017 14:26:13 +0000 (UTC) Cc: 26525@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 17 16:26:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d07bU-0004eG-Ly for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Apr 2017 16:26:08 +0200 Original-Received: from localhost ([::1]:36838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d07ba-0002yu-KW for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Apr 2017 10:26:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d07bS-0002xZ-UI for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2017 10:26:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d07bO-0005iz-OK for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2017 10:26:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d07bO-0005id-Lk for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2017 10:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d07bO-0006W7-GK for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2017 10:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Apr 2017 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26525-submit@debbugs.gnu.org id=B26525.149243910924991 (code B ref 26525); Mon, 17 Apr 2017 14:26:02 +0000 Original-Received: (at 26525) by debbugs.gnu.org; 17 Apr 2017 14:25:09 +0000 Original-Received: from localhost ([127.0.0.1]:52571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d07aX-0006V0-KM for submit@debbugs.gnu.org; Mon, 17 Apr 2017 10:25:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d07aW-0006Uo-Cf for 26525@debbugs.gnu.org; Mon, 17 Apr 2017 10:25:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d07aN-0004Vp-AX for 26525@debbugs.gnu.org; Mon, 17 Apr 2017 10:25:03 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d07aN-0004Ve-7M; Mon, 17 Apr 2017 10:24:59 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1572 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d07aM-0001HF-Gh; Mon, 17 Apr 2017 10:24:58 -0400 In-reply-to: <2c330c44-4919-7d2f-cb20-c9b72c9e8050@gmail.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel on Mon, 17 Apr 2017 09:29:20 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:131692 Archived-At: > Cc: 26525@debbugs.gnu.org > From: Clément Pit-Claudel > Date: Mon, 17 Apr 2017 09:29:20 -0400 > > On 2017-04-17 03:14, Eli Zaretskii wrote: > >> But the condition and the comment seem at odds, and it doesn't say much about why it calls `sit-for`. > > > > I'm not quite sure what needs to be explained. I think the doc string > > of flyspell-delay and flyspell-default-delayed-commands tell the whole > > story; if something is unclear there, please say what is unclear. > > The code reads (cond ((get this-command 'flyspell-delayed) …)), but the comment says "The current command is not delayed". Does a non-nil flycheck-delayed really mean that the command is *not* delayed? I think the comment should be moved 2 lines below its current place, that's all. > > If you want to see this feature in action, turn on Flyspell, then type > > something like "ssss", and then wait _without_ typing any non-word > > character. You will see that the mis-spelled word is marked only > > after 3 sec, the default value of flyspell-delay. Then contrast that > > with the same word with a space typed after it. > > Thanks! I don't expect that this feature is intended to slow down typing, though, right? In the example I posted it makes typing painfully slow. I didn't see any example in your OP, only a profile. What did I miss? And no, this is not supposed to slow down typing in any significant way, as long as you type, because sit-for is supposed to return as soon as input is available. Your complaint was about CPU usage, not about time delays, AFAIU.