Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

0 views
Skip to first unread message

Damien Cassou

unread,
Oct 17, 2017, 8:09:15 AM10/17/17
to Clément Pit-Claudel, 26...@debbugs.gnu.org
> 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 happened to me in the past then stopped for months. Now it happens
again and is really annoying. Emacs regularly freezes for around 5
seconds when I manipulate text.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Stefan Kangas

unread,
Aug 12, 2020, 9:42:05 PM8/12/20
to Clément Pit-Claudel, Eli Zaretskii, 26...@debbugs.gnu.org
Clément Pit-Claudel <cpitc...@gmail.com> writes:

> On 2017-04-17 10:25, Eli Zaretskii wrote:
>>> 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.
>
> Indeed, there was only a profile; I don't have a good repro yet. In that case, flyspell was slowing things down a lot, and the complaint was indeed about delays.
> Sorry for being unclear.

That was 3 years ago. Are you still seeing this on a recent version of
Emacs, such as the recently released 27.1?

Best regards,
Stefan Kangas



Stefan Kangas

unread,
Aug 28, 2020, 7:50:04 AM8/28/20
to Damien Cassou, Clément Pit-Claudel, 26...@debbugs.gnu.org
Damien Cassou <dam...@cassou.me> writes:

>> 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 happened to me in the past then stopped for months. Now it happens
> again and is really annoying. Emacs regularly freezes for around 5
> seconds when I manipulate text.

Damien Cassou

unread,
Aug 28, 2020, 8:37:07 AM8/28/20
to Stefan Kangas, Clément Pit-Claudel, 26...@debbugs.gnu.org
Stefan Kangas <ste...@marxist.se> writes:
> That was 3 years ago. Are you still seeing this on a recent version of
> Emacs, such as the recently released 27.1?

This hasn't happened for some time.

--
Damien Cassou

Clément Pit-Claudel

unread,
Aug 28, 2020, 2:41:06 PM8/28/20
to Damien Cassou, Stefan Kangas, 26...@debbugs.gnu.org
On 8/28/20 8:35 AM, Damien Cassou wrote:
> Stefan Kangas <ste...@marxist.se> writes:
>> That was 3 years ago. Are you still seeing this on a recent version of
>> Emacs, such as the recently released 27.1?
>
> This hasn't happened for some time.
>

There was a report of a similar issue on reddit recently, but it hasn't happened to me of late.



Stefan Kangas

unread,
Aug 29, 2020, 12:28:06 PM8/29/20
to Clément Pit-Claudel, Damien Cassou, 26...@debbugs.gnu.org
tags 26525 + unreproducible
thanks
You wouldn't happen to have a link to the relevant thread? I tried
searching the web but couldn't find anything.

I'm marking this bug as unreproducible for now. Please report back if
you see this again or can provide any more information.



Clément Pit-Claudel

unread,
Aug 29, 2020, 2:11:05 PM8/29/20
to Stefan Kangas, Damien Cassou, 26...@debbugs.gnu.org
On 8/29/20 12:27 PM, Stefan Kangas wrote:
> You wouldn't happen to have a link to the relevant thread? I tried
> searching the web but couldn't find anything.

https://www.reddit.com/r/emacs/comments/i96lbo/flyspell_consuming_most_of_my_resources_why_oo/ , sorry for not including it the first time.



Nick H

unread,
Sep 2, 2020, 7:17:06 PM9/2/20
to ste...@marxist.se, Damien Cassou, Clément Pit-Claudel, 26...@debbugs.gnu.org

> I'm marking this bug as unreproducible for now. Please report back
> if you see this again or can provide any more information.

I just bumped into this bug on 27.1 with the same symptoms - typing lag
after activating flyspell-mode.

I took a couple of profiles - the first when lag was apparent and
another after clearing the lag by toggling flyspell-mode.

Both profiles show a similar result, so the "high cpu" in sit-for might
be a red-herring.

Profile 1 - with lag
- flyspell-post-command-hook 1146 92%
- flyspell-check-word-p 1120 90%
- sit-for 1117 90%
- redisplay 551 44%
+ redisplay_internal (C function) 1 0%
read-event 390 31%
- flyspell-get-not-casechars 1 0%
ispell-get-decoded-string 1 0%
+ flyspell-word 8 0%
+ flyspell-check-pre-word-p 3 0%
+ command-execute 65 5%
+ ... 22 1%
+ undo-auto--add-boundary 1 0%

Profile 2 - without lag
- flyspell-post-command-hook 3507 94%
- flyspell-check-word-p 3432 92%
- sit-for 3414 92%
- redisplay 1660 44%
+ redisplay_internal (C function) 3 0%
+ read-event 1317 35%
+ ispell-get-otherchars 6 0%
+ flyspell-get-not-casechars 5 0%
+ flyspell-word 17 0%
+ flyspell-check-pre-word-p 13 0%
+ command-execute 93 2%
+ ... 87 2%
+ timer-event-handler 3 0%
undo-auto--add-boundary 2 0%
tooltip-hide 1 0%

Nick




Stefan Kangas

unread,
Sep 3, 2020, 6:20:04 AM9/3/20
to Nick H, Damien Cassou, Clément Pit-Claudel, 26...@debbugs.gnu.org
Nick H <ni...@tenpoint.co.nz> writes:

> I just bumped into this bug on 27.1 with the same symptoms - typing lag
> after activating flyspell-mode.

What is your ispell/flyspell configuration?

Do you have any ideas about how to reproduce it, or could you say
something about the circumstances under which you saw this?



0 new messages