Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% CPU usage and slow input response when Windows spellchecking is enabled #8833

Closed
grandsilence opened this issue Oct 15, 2020 · 13 comments
Closed
Labels

Comments

@grandsilence
Copy link

Steps to reproduce

  1. Open settings and enable system spellchecking
  2. Open any chat tab
  3. Write a lot of symbols in chat textbox like:
......................................................................................................................................................................................................................................

Expected behaviour

Spellchecking method should be called only once, 200 ms after the last input, not on every key press (debounce event via timer required).

Actual behaviour

On each symbol type Telegram calling spellcheck method and load CPU on each key press.
cpu

Configuration

Operating system: Windows 10 1803
Version of Telegram Desktop: 2.4.3
Used theme: Default

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Oct 15, 2020

Are you sure that this is due to the spellchecker? Telegram writes drafts synchronously to disk on each text write and that may cause the same behavior, there are an issue for that already:#7952 (the issue is cross-platform even though reported by a Linux user)

@grandsilence
Copy link
Author

@ilya-fedin Yes, I'm sure. If I turn off grammar checking, CPU consumption is 0.1% for Telegram.exe. I just checked it out.

@grandsilence
Copy link
Author

Looks like #8612 already reported about it.

@ilya-fedin
Copy link
Contributor

200 ms after the last input

Just wondering, why 200ms exactly?

@grandsilence
Copy link
Author

grandsilence commented Oct 15, 2020

@ilya-fedin 100-200ms is average value of user reaction. So it's a good value for debounce / throttling events.

@ilya-fedin
Copy link
Contributor

Thanks.

@23rd
Copy link
Collaborator

23rd commented Oct 15, 2020

Thanks for your report, I'll check it later.

@23rd
Copy link
Collaborator

23rd commented Oct 22, 2020

@grandsilence Are you sure that pure dots without any letter are the cause of high CPU usage?

@grandsilence
Copy link
Author

@23rd Yes, I’m sure. Just dots cause of 100% cpu usage. I can make a GIF.

@23rd
Copy link
Collaborator

23rd commented Oct 22, 2020

I can make a GIF.

I would appreciate it.

@grandsilence
Copy link
Author

grandsilence commented Oct 22, 2020

@23rd GIFs:

Spellchecking is ON

Spellchecking is enabled

Spellchecking is OFF

Spellchecking is disabled

@Aokromes Aokromes added the bug label Nov 10, 2020
@grandsilence
Copy link
Author

The problem with the CPU load has been solved, as of version v2.5.9 (Beta).
It remains to fix the problem with microlags during the printing of the message (issue #7952).

@github-actions
Copy link

github-actions bot commented Apr 9, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants