Is it possible to know when a PlasmaCore IconItem is ready?

Michail Vourlakos mvourlakos at gmail.com
Fri Jul 29 15:35:13 UTC 2016


>
> Move the IconItem outside the DropShadow.
> Otherwise you're scaling the source still, which is what we want to avoid.
>
> Out of curiosity, how are you measuring performance?
>

David even this way I get the same bad performance... This is the code
inside a task delegate. I have implemented a qml plasmoid that acts as
an alternative task list but it mimics the plank animation or mac
style. The main animation in this case is when the user hovers a task
and that task is zoomed and its neighbour tasks also. Most of the code
is based on the current tasks plasmoid of 5.7 except the appearance
and the animations.

To check the performance I install the plasmoid with "plasmapkg2 -u "
and after that I use plasmawindowed to watch it. After that I open
ksysguard and I watch the cpu% that is used when then user hovers the
tasks and goes its mouse on the task list back and forth. With the
following code my sluggish old netbook reaches and remain at around
80% of cpu cycles when the user hovers tasks in that list, and
actually there is no smooth animation at all. With the Images solution
I sent earlier this is at 40% cpu in the same hardware and there is a
smooth hovering animation.

In my main computer at the office with the following solution I get
around 25% of cpu with smooth animation but with the Images solution I
get maximum 9% of cpu


-----------------------------------
 PlasmaCore.IconItem {
        id: iconImage

        width:64
        height:64

        anchors.centerIn: parent

        active: true
        enabled: true
        usesPlasmaTheme: false

        source: decoration

    }

    DropShadow {
        id:shadowImageNoActive

        width: 64
        height: 64

        scale: wrapper.scale * wrapper.appearScale

        anchors.centerIn: parent

        radius: 7.0
        samples: 10
        color: "#90080808"
        source: ShaderEffectSource {
            id:effectSource
            width: iconImage.width
            height: iconImage.height
            sourceItem: iconImage
            hideSource: true
            live: false
        }

    }


More information about the Plasma-devel mailing list