Bug 421327 - Kate lags when editing file contains some languages
Summary: Kate lags when editing file contains some languages
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 20.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-11 10:48 UTC by Guo Yunhe
Modified: 2020-12-09 04:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2020-05-11 10:48:21 UTC
SUMMARY


STEPS TO REPRODUCE
1. Download this file https://cgit.kde.org/khotkeys.git/tree/app/khotkeys.desktop
2. Open it in Kate
3. Try to edit and navigate through the file

OBSERVED RESULT
The editor is lagging. CPU usage is high.

EXPECTED RESULT
The editor should run smoothly.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20200508
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Kernel Version: 5.6.11-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 31.1 GiB


ADDITIONAL INFORMATION
Comment 1 Christoph Feck 2020-06-05 00:46:35 UTC
I think QFontEngine only caches a certain amount of glyphs. If you are rendering in multiple writing systems, the cache is invalidated effectively for each line.
Comment 2 Justin Zobel 2020-10-30 05:34:42 UTC
Guo I've just tested this in kate from git master.

I cannot reproduce lag or any unusually high CPU usage.

Can you please retest and confirm if this is still an issue for you?
Comment 3 Guo Yunhe 2020-10-30 06:53:05 UTC
I can still reproduce it with Kate 20.08.2.

It may require some fonts to be installed.
Comment 4 Justin Zobel 2020-10-30 06:54:46 UTC
(In reply to Guo Yunhe from comment #3)
> I can still reproduce it with Kate 20.08.2.
> 
> It may require some fonts to be installed.

Are you able to try and boot KDE Neon User Edition in a Virtual Machine or on your PC (live USB is fine) and see if it's OK there.
Comment 5 Guo Yunhe 2020-10-30 07:06:54 UTC
I am in a hospital and the wifi doesn't allow me to download large files...

These special languages fallback to GNU Unifont because it is the only font that cover these characters.

I found that if you change the editor's font to GNU Unifont, then no matter what file you open, the editor is super slow when scrolling and editing.

Also I am using 150% scaling in X11. It may affect.
Comment 6 Christoph Feck 2020-11-09 23:40:27 UTC
Hi Guo, I hope you are fine. Feel free to test any time later.

GNU Unifont is a bitmap font, which might indeed be slower to render, because the caches are optimized for scalable fonts. Please try with the Noto family; they should have all scripts covered.

To rule out scaling, temporarily disable it to confirm it doesn't cause the slowdown.
Comment 7 Bug Janitor Service 2020-11-24 04:33:57 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2020-12-09 04:34:21 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!