Don't load QPT in kcminit
ClosedPublic

Authored by davidedmundson on Sep 28 2016, 3:12 PM.

Details

Summary

KCMInit is loaded early in startkde, and it blocks all other processes
from starting until it is complete.

This can be up to 1.1 seconds.
(http://imgh.us/bootchart-20160928-1316.svg)

A sizable amount of time (46% of CPU) is spent loading our QPT. This
isn't very useful given none of the kcm_init scripts have any UI and
it's not something they should have. It's only a QGuiApplication so that
they have an X connection.

Test Plan

Checked it ran without errors

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Don't load QPT in kcminit.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 28 2016, 3:12 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bshah accepted this revision.Sep 28 2016, 3:16 PM
bshah added a reviewer: bshah.
This revision is now accepted and ready to land.Sep 28 2016, 3:16 PM
This revision was automatically updated to reflect the committed changes.
broulik added inline comments.
startkde/kcminit/main.cpp
256

This is a static and docs explicitly mention "This function must be called before creating the QGuiApplication object",

http://doc.qt.io/qt-5/qguiapplication.html#setDesktopSettingsAware

graesslin reopened this revision.Oct 4 2016, 6:47 AM
graesslin added a subscriber: graesslin.

Reopening due to @broulik's comment. This clearly must be called before creating the QGuiApplication as the ctor of QGuiApplication creates the QPT plugin.

This revision is now accepted and ready to land.Oct 4 2016, 6:47 AM