GNU bug report logs - #26525
`sit-for' in Flyspell slows typing down, hogs 90% of CPU

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Sat, 15 Apr 2017 20:29:02 UTC

Severity: normal

Tags: unreproducible

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: `sit-for' in Flyspell slows typing down, hogs 90% of CPU
Date: Sat, 15 Apr 2017 16:28:14 -0400
[Message part 1 (text/plain, inline)]
Hi bug-gnu-emacs,

I have attached a profile in which Flyspell's flyspell-check-word-p consumes 89% of CPU time while typing text in a buffer.  This seems to be due to a call to sit-for in flyspell-check-word-p.  What is this sit-for there for?

- flyspell-post-command-hook                                     6077  89%
 - flyspell-check-word-p                                         6073  89%
  - sit-for                                                      6067  89%
   - read-event                                                  3826  56%
    + redisplay_internal (C function)                             128   1%
    + timer-event-handler                                          91   1%
    + fstar-subp-filter                                             3   0%
   - redisplay                                                   2205  32%
    + redisplay_internal (C function)                             100   1%
  + flyspell-get-not-casechars                                      2   0%
 + flyspell-check-pre-word-p                                        4   0%
+ command-execute                                                 220   3%
+ ...                                                             131   1%
+ timer-event-handler                                             116   1%
+ redisplay_internal (C function)                                 114   1%
+ company-post-command                                            102   1%
+ flycheck-perform-deferred-syntax-check                            5   0%
+ eldoc-pre-command-refresh-echo-area                               3   0%
  sml/generate-position-help                                        1   0%

I haven't spent much time investigating this issue yet, and my current repro isn't exactly reliable, but I was hoping that someone might be able to provide insight into Flyspell's behaviour before I dive to deep :) I did verify that disabling Flyspell fixed the issue.

Thanks!
Clément.
[flyspell.prof (text/plain, attachment)]

This bug report was last modified 4 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.