Bug 401802 - High CPU Usage when opening any translation file
Summary: High CPU Usage when opening any translation file
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-05 21:57 UTC by Gontzal M. Pujana
Modified: 2019-12-04 08:21 UTC (History)
2 users (show)

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


Attachments
The STRACE of lokalize when the bug happens, with timestamps (3.72 MB, text/plain)
2018-12-05 22:05 UTC, Gontzal M. Pujana
Details
Lokalize in HTOP using 100% of a core (57.21 KB, image/png)
2018-12-05 22:12 UTC, Gontzal M. Pujana
Details
Lokalize in KSysGuard (97.54 KB, image/png)
2018-12-05 22:13 UTC, Gontzal M. Pujana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gontzal M. Pujana 2018-12-05 21:57:26 UTC
SUMMARY


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Gontzal M. Pujana 2018-12-05 22:02:36 UTC
Sorry, I missclicked.

SUMMARY

Lokalize utilizes a full core at 100% when opening any PO file.

STEPS TO REPRODUCE
1. Start Lokalize
2. Project Summary loads, normal CPU usage
3. When opening a .po file from the Project Summary, it will start to load the translation memory. Once it's loaded, the program will keep utilizing a full core until the file is closed.

OBSERVED RESULT

High CPU usage when opening a translation file

EXPECTED RESULT

Normal CPU usage when opening a translation file. Strace shows lots of polling, reads and writes whenever a file is opened.

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.2
Comment 2 Gontzal M. Pujana 2018-12-05 22:05:34 UTC
Created attachment 116693 [details]
The STRACE of lokalize when the bug happens, with timestamps
Comment 3 Gontzal M. Pujana 2018-12-05 22:12:56 UTC
Created attachment 116696 [details]
Lokalize in HTOP using 100% of a core
Comment 4 Gontzal M. Pujana 2018-12-05 22:13:13 UTC
Created attachment 116697 [details]
Lokalize in KSysGuard
Comment 5 Simon Depiets 2018-12-14 02:49:06 UTC
Hello,
Could you try with the latest 18.12 version, does it still happen ?
It might also have to do with the translation memory.
Comment 6 Gontzal M. Pujana 2018-12-14 12:49:43 UTC
(In reply to Simon Depiets from comment #5)
> Hello,
> Could you try with the latest 18.12 version, does it still happen ?
> It might also have to do with the translation memory.

I just compiled the 19.03.70 version straight from Git, still happens, a full core is constantly used.

I deleted the translation memory and glossary, no change in CPU usage. Every time a file is opened it just spikes up, no matter how big the file is.

I tested in two different computers and was able to reproduce easily.

Both computers are using Manjaro KDE 18.0 with Kernel 4.19.6-1-MANJARO.
Comment 7 Adrián Chaves (Gallaecio) 2019-11-29 10:53:13 UTC
Can you still reproduce this?
Comment 8 Gontzal M. Pujana 2019-12-03 19:32:34 UTC
As of version 19.08.03 it does no longer happen.
Comment 9 Adrián Chaves (Gallaecio) 2019-12-04 08:21:05 UTC
Thanks!