Skip to content
  • Lindsay Roberts's avatar
    Systray: Move all icon resolution to dataengine · e43b89e2
    Lindsay Roberts authored
    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
    e43b89e2