Systray: Move all icon resolution to dataengine

Authored by roberts on Oct 10 2016, 4:55 PM.

Description

Systray: Move all icon resolution to dataengine

Summary:
Changes triggered by investigation into a long-running high CPU usage bug with system tray animations. The systray itself had icon name to icon resolution code, which was being triggered (twice) for every icon, every time any icon in the systray was updated. This code was spinning up a KIconLoader on each of these instances, and throwing it directly away. Each one triggered a large quantity of memory allocations and disk scans.

This patch moves the extra bit of "appName" logic from the native part of the system tray to the statusnotifieritem datasource, which already had a stored 'customIconLoader' to handle icon theme paths, and removes the special lookup from the sytemtray applet completely. It also prefers icons provided by the dataengine to doing another lookup (contentious?). This removes all the extra CPU usage outside of the QML scene graph and graphics drivers locally.

This is very much a looking for feedback item - there are things about the icon loading paths I almost certainly haven't appreciated yet, and perhaps preferring loading by icon name in the applet has a another purpose.

BUG: 356479

Test Plan: Have tested locally with kgpg and steam, the two apps I have that trigger the old code path. In neither case, however, did the appName logic produce a different result to the code with just the icon search path in statusnotifieritem.

Reviewers: Plasma, davidedmundson, mart

Reviewed By: Plasma, davidedmundson, mart

Subscribers: davidedmundson, plasma-devel

Tags: Plasma

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

Details

Committed
robertsOct 10 2016, 5:35 PM
Reviewer
Plasma
Differential Revision
D2986: Systray: Move all icon resolution to dataengine
Parents
R120:c63baa3ae354: [shell] Don't resize or reposition panel if we are doing restore
Branches
Unknown
Tags
Unknown