[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Is it possible to know when a PlasmaCore IconItem is ready?
From:       David Edmundson <david () davidedmundson ! co ! uk>
Date:       2016-07-29 15:41:16
Message-ID: CAGeFrHDBaDXvzvhGLJHUYoQo-s=LumWXUn6sjwnD7-mWXaSvNA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Given you already have

usePlasmaTheme:false

does using QIconItem from KQuickControlsAddons work any better?

David

On Fri, Jul 29, 2016 at 4:35 PM, Michail Vourlakos <mvourlakos@gmail.com>
wrote:

> >
> > 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
>         }
>
>     }
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div>Given you already \
have<br><br></div>usePlasmaTheme:false <br><br></div>does using QIconItem from \
KQuickControlsAddons work any \
better?<br><br></div>David<br><div><div><div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 29, 2016 at 4:35 PM, \
Michail Vourlakos <span dir="ltr">&lt;<a href="mailto:mvourlakos@gmail.com" \
target="_blank">mvourlakos@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">&gt;<br> &gt; Move the IconItem outside the \
DropShadow.<br> &gt; Otherwise you&#39;re scaling the source still, which is what we \
want to avoid.<br> &gt;<br>
&gt; Out of curiosity, how are you measuring performance?<br>
&gt;<br>
<br>
</span>David even this way I get the same bad performance... This is the code<br>
inside a task delegate. I have implemented a qml plasmoid that acts as<br>
an alternative task list but it mimics the plank animation or mac<br>
style. The main animation in this case is when the user hovers a task<br>
and that task is zoomed and its neighbour tasks also. Most of the code<br>
is based on the current tasks plasmoid of 5.7 except the appearance<br>
and the animations.<br>
<br>
To check the performance I install the plasmoid with &quot;plasmapkg2 -u &quot;<br>
and after that I use plasmawindowed to watch it. After that I open<br>
ksysguard and I watch the cpu% that is used when then user hovers the<br>
tasks and goes its mouse on the task list back and forth. With the<br>
following code my sluggish old netbook reaches and remain at around<br>
80% of cpu cycles when the user hovers tasks in that list, and<br>
actually there is no smooth animation at all. With the Images solution<br>
I sent earlier this is at 40% cpu in the same hardware and there is a<br>
smooth hovering animation.<br>
<br>
In my main computer at the office with the following solution I get<br>
around 25% of cpu with smooth animation but with the Images solution I<br>
get maximum 9% of cpu<br>
<br>
<br>
-----------------------------------<br>
<div class="HOEnZb"><div class="h5">  PlasmaCore.IconItem {<br>
            id: iconImage<br>
<br>
            width:64<br>
            height:64<br>
<br>
            anchors.centerIn: parent<br>
<br>
            active: true<br>
            enabled: true<br>
            usesPlasmaTheme: false<br>
<br>
            source: decoration<br>
<br>
      }<br>
<br>
      DropShadow {<br>
            id:shadowImageNoActive<br>
<br>
            width: 64<br>
            height: 64<br>
<br>
            scale: wrapper.scale * wrapper.appearScale<br>
<br>
            anchors.centerIn: parent<br>
<br>
            radius: 7.0<br>
            samples: 10<br>
            color: &quot;#90080808&quot;<br>
            source: ShaderEffectSource {<br>
                  id:effectSource<br>
                  width: iconImage.width<br>
                  height: iconImage.height<br>
                  sourceItem: iconImage<br>
                  hideSource: true<br>
                  live: false<br>
            }<br>
<br>
      }<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
</div></div></blockquote></div><br></div></div></div></div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic