Add a LauncherUrlWithoutIcon data role as a speed optimization.
ClosedPublic

Authored by hein on Jun 16 2016, 9:36 PM.

Details

Summary

Makes the API more complex, but it's worth it as it allows
knowledgable users to opt into avoding costly work and/or
data copies in very common use cases.

Significantly speeds up a lot of work in the models in the
presence of X apps that can't be identified and fall back to
the window icon.

Based on profiling by David.

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.
hein updated this revision to Diff 4560.Jun 16 2016, 9:36 PM
hein retitled this revision from to Add a LauncherUrlWithoutIcon data role as a speed optimization..
hein updated this object.
hein edited the test plan for this revision. (Show Details)
hein added reviewers: dfaure, davidedmundson.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptJun 16 2016, 9:36 PM
dfaure added inline comments.Jun 17 2016, 7:17 AM
libtaskmanager/tasksmodel.cpp
355–356

Is IgnoreQueryItems still needed, now that both URLs are without icon data?

(or could there potentially be other query items in the future?)

libtaskmanager/xwindowtasksmodel.cpp
656

You could swap the two conditions, for a femto-second speed improvement in the common case.

hein updated this revision to Diff 4576.Jun 17 2016, 7:48 AM
hein marked 2 inline comments as done.

Assume iconData is the only query item and, since the WithoutIcon
data role won't add it, avoid unnecessary calls to launcherUrlsMatch
and thus QUrl::adjusted.

dfaure accepted this revision.Jun 17 2016, 7:57 AM
dfaure edited edge metadata.
This revision is now accepted and ready to land.Jun 17 2016, 7:57 AM
This revision was automatically updated to reflect the committed changes.