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

List:       kde-panel-devel
Subject:    Re: Review Request: fewer pixmaps created in pixmap transitions
From:       "Marco Martin" <notmart () gmail ! com>
Date:       2010-09-22 18:40:48
Message-ID: 20100922184048.20843.20700 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5406/#review7724
-----------------------------------------------------------

Ship it!


modulo the usual little cleanings still needed the overall logic seems impr=
oved a lot


/trunk/KDE/kdelibs/plasma/animations/pixmaptransition_p.h
<http://svn.reviewboard.kde.org/r/5406/#comment7835>

    isCached() and setCached()?
    or usesCache() and setUsesCache()
    (with the property named usesCache)



/trunk/KDE/kdelibs/plasma/animations/pixmaptransition.cpp
<http://svn.reviewboard.kde.org/r/5406/#comment7836>

    how much is indented? ;)



/trunk/KDE/kdelibs/plasma/paintutils.cpp
<http://svn.reviewboard.kde.org/r/5406/#comment7837>

    this if shouldn't be needed anymore as well?


- Marco


On 2010-09-22 18:36:20, Aaron Seigo wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5406/
> -----------------------------------------------------------
> =

> (Updated 2010-09-22 18:36:20)
> =

> =

> Review request for Plasma.
> =

> =

> Summary
> -------
> =

> This prevents the creation of new pixmaps as much as possible while doing=
 transition effects at the cost of creating more pixmaps on the fly. It int=
roduces a new property, cache, to PixmapTransition to restore the old behav=
iour. However, most of our widgets already do caching internally, so the ad=
ded pixmap copy is just that: a copy. It sits around taking up pixmap memor=
y for no particularly good reason. In the Javascript plasmoid I'm working o=
n, it creates a table with buttons, some 146 buttons, in fact. This drops t=
he Pixmap count from nearly 150 for the same (pixel-wise) button pixmap to =
1.
> =

> Combined with my commits from last night and a new caching scheme for Fra=
meSvg, creating these buttons has dropped from 6-9 seconds on my machine to=
 2-3 seconds.
> =

> =

> Diffs
> -----
> =

>   /trunk/KDE/kdelibs/plasma/animations/pixmaptransition.cpp 1178174 =

>   /trunk/KDE/kdelibs/plasma/animations/pixmaptransition_p.h 1178174 =

>   /trunk/KDE/kdelibs/plasma/paintutils.cpp 1178174 =

> =

> Diff: http://svn.reviewboard.kde.org/r/5406/diff
> =

> =

> Testing
> -------
> =

> git@coherenttheory.com:plasmoidprogress.git
> =

> =

> Thanks,
> =

> Aaron
> =

>


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/5406/">http://svn.reviewboard.kde.org/r/5406/</a>
  </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">modulo the usual little \
cleanings still needed the overall logic seems improved a lot</pre>  <br />





<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="/r/5406/diff/1/?file=36734#file36734line45" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdelibs/plasma/animations/pixmaptransition_p.h</a>  <span \
style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">namespace Plasma</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">45</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">Q_PROPERTY</span><span class="p">(</span><span class="n">QPixmap</span> \
<span class="n">cache</span> <span class="n">READ</span> <span class="n">cache</span> \
<span class="n">WRITE</span> <span class="n">setCache</span><span \
class="p">)</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">isCached() \
and setCached()? or usesCache() and setUsesCache()
(with the property named usesCache)</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="/r/5406/diff/2/?file=36736#file36736line200" style="color: black; font-weight: \
bold; text-decoration: \
underline;">/trunk/KDE/kdelibs/plasma/animations/pixmaptransition.cpp</a>  <span \
style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>  <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">void PixmapTransition::updateEffectiveTime(int currentTime)</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">154</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            \
<span class="n">m_targetRect</span> <span class="o">=</span> <span \
class="n">m_targetPixmap</span><span class="p">.</span><span \
class="n">rect</span><span class="p">();</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">how much is \
indented? ;)</pre> </div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="/r/5406/diff/2/?file=36738#file36738line196" style="color: black; font-weight: \
bold; text-decoration: underline;">/trunk/KDE/kdelibs/plasma/paintutils.cpp</a>  \
<span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
centerPixmaps(QPixmap &amp;from, QPixmap &amp;to)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">188</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">centerPixmaps</span><span class="p">(</span><span \
class="n">startPixmap</span><span class="p">,</span> <span \
class="n">targetPixmap</span><span class="p">);</span></pre></td>  <th \
bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">195</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c1"><span class="hl">//</span>        centerPixmaps(startPixmap, \
targetPixmap);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this if \
shouldn&#39;t be needed anymore as well?</pre> </div>
<br />



<p>- Marco</p>


<br />
<p>On September 22nd, 2010, 6:36 p.m., Aaron Seigo wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Plasma.</div>
<div>By Aaron Seigo.</div>


<p style="color: grey;"><i>Updated 2010-09-22 18:36:20</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This prevents the creation of new pixmaps as much as possible while \
doing transition effects at the cost of creating more pixmaps on the fly. It \
introduces a new property, cache, to PixmapTransition to restore the old behaviour. \
However, most of our widgets already do caching internally, so the added pixmap copy \
is just that: a copy. It sits around taking up pixmap memory for no particularly good \
reason. In the Javascript plasmoid I&#39;m working on, it creates a table with \
buttons, some 146 buttons, in fact. This drops the Pixmap count from nearly 150 for \
the same (pixel-wise) button pixmap to 1.

Combined with my commits from last night and a new caching scheme for FrameSvg, \
creating these buttons has dropped from 6-9 seconds on my machine to 2-3 \
seconds.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">git@coherenttheory.com:plasmoidprogress.git</pre>  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/KDE/kdelibs/plasma/animations/pixmaptransition.cpp <span style="color: \
grey">(1178174)</span></li>

 <li>/trunk/KDE/kdelibs/plasma/animations/pixmaptransition_p.h <span style="color: \
grey">(1178174)</span></li>

 <li>/trunk/KDE/kdelibs/plasma/paintutils.cpp <span style="color: \
grey">(1178174)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/5406/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
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