Bug 484328 - Kmail config dialog takes about 40 seconds to show up
Summary: Kmail config dialog takes about 40 seconds to show up
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: config dialog (show other bugs)
Version: 6.0.1
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-23 14:36 UTC by Kevin Krammer
Modified: 2024-03-27 06:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.5.4


Attachments
Kmail log entries from journald (146.24 KB, text/x-log)
2024-03-23 14:36 UTC, Kevin Krammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Krammer 2024-03-23 14:36:16 UTC
Created attachment 167655 [details]
Kmail log entries from journald

SUMMARY

Since upgrade to 6.0 opening the Kmail config dialog for the first time after startup takes 30-40 seconds, with CPU load spiking.

Most likely related to querying font information because it spams the log with OpenType messages (see attachment).


STEPS TO REPRODUCE
1. Start Kmail
2. Settings -> Configure Kmail
3. 

OBSERVED RESULT

30-40 seconds of high CPU load before dialog shows up.
log (via journalctl) gets hundreds of entries related to OpenType

EXPECTED RESULT

Config dialog shows up in a couple of seconds.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Neon 6.0
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version:  6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Comment 1 Laurent Montel 2024-03-27 06:36:00 UTC
Hi,
the problem comes from:
=> const QString nativeName = lang.nativeLanguageName();
it will translate language string => when we fill combobox it will draw text with specific font
=> it will take time.

(we have the same problem with kcmshell6 regionandlang -> lang -> modify -> change language)

I will fix by not translating language name.
I can't find another solution.
Regards
Comment 2 Laurent Montel 2024-03-27 06:45:19 UTC
Git commit 5459cdf40f690935ade6ce853f88090b373f8091 by Laurent Montel.
Committed on 27/03/2024 at 06:42.
Pushed by mlaurent into branch 'master'.

Fix bug 484328: Kmail config dialog takes about 40 seconds to show up

It loads all list of qlocale and show translated name
but it will search to display translated name => it will search
which font used. but we don't have all font
=> it will take time to search another one.

=> now we don't translate name.
FIXED-IN: 1.5.4

M  +4    -0    textautocorrection/widgets/autocorrectionlanguagemodel.cpp

https://invent.kde.org/libraries/ktextaddons/-/commit/5459cdf40f690935ade6ce853f88090b373f8091
Comment 3 Laurent Montel 2024-03-27 06:45:51 UTC
Git commit 6b2f6829dca5ab527332b35cf324f6b08c6aad87 by Laurent Montel.
Committed on 27/03/2024 at 06:45.
Pushed by mlaurent into branch '1.5'.

Fix bug 484328: Kmail config dialog takes about 40 seconds to show up

It loads all list of qlocale and show translated name
but it will search to display translated name => it will search
which font used. but we don't have all font
=> it will take time to search another one.

=> now we don't translate name.
FIXED-IN: 1.5.4
(cherry picked from commit 5459cdf40f690935ade6ce853f88090b373f8091)

M  +4    -0    textautocorrection/widgets/autocorrectionlanguagemodel.cpp

https://invent.kde.org/libraries/ktextaddons/-/commit/6b2f6829dca5ab527332b35cf324f6b08c6aad87