Bug 366158

Summary: Switching sections inside Info module results with small lag when rendering their content
Product: [Applications] kinfocenter Reporter: soee <kontakt>
Component: generalAssignee: David Hubner <hubn3rd>
Status: RESOLVED FIXED    
Severity: normal CC: cfeck, sitter
Priority: NOR    
Version First Reported In: 5.7.2   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: About System kcm content with variables placeholders inside Info mdule

Description soee 2016-07-27 09:23:19 UTC
When switching Info module sections that use some variables loaded for example from files, than we see for a moment those variables placeholders like {NameVersionLabel} or {UrlLabel} in About System section.

See attached screenshot to see it.

Reproducible: Always

Steps to Reproduce:
1. Open Info module
2. Switch between Memory and About System sections
3. Observ the lag when loading and replacing placeholders in About System section content

Actual Results:  
For a moment we see variables placeholders like {NameVersionLabel}

Expected Results:  
Placeholders hsould never be seen  - just final output
Comment 1 soee 2016-07-27 09:24:12 UTC
Created attachment 100329 [details]
About System kcm content with variables placeholders inside Info mdule
Comment 2 Harald Sitter 2016-07-27 09:29:56 UTC
You can actually keep clicking the about-distro module to reload it and observe this happening. Why there is such a noticable delay in loading is a bit peculiar. Assuming it's not just bad code that takes longer than necessary we probably should simply setHidden(true) everything and setHidden(false) when loading is done. Alas, that simply changes the issue from "random text" to "noticable time empty" so it's probably more of a workaround. Also I'd say this applies to some KCMs but not all of them. e.g. Memory looks fine. Energy Information however also has the weird delay going on.
Comment 3 Christoph Feck 2016-07-27 12:03:38 UTC
I suggest to add a "load();" at the end of the constructor for each module, where the information is sufficiently fast displayed.
Comment 4 Harald Sitter 2016-07-27 13:25:54 UTC
Git commit 8600dff7216c8f983ce991ac2e856b3aa7df28b7 by Harald Sitter.
Committed on 27/07/2016 at 13:25.
Pushed by sitter into branch 'Plasma/5.7'.

always load about-distro in ctor

Summary:
otherwise get a noticable delay during which we show dummy data. since
we only access on-disk content and only very little of it loading via ctor
should have next to no impact.

Reviewers: cfeck, sebas

Reviewed By: sebas

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2300

M  +6    -0    Modules/about-distro/src/Module.cpp

http://commits.kde.org/kinfocenter/8600dff7216c8f983ce991ac2e856b3aa7df28b7