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

List:       kde-panel-devel
Subject:    Re: Review Request 115326: fix theme cache cleanup and discarding
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2014-01-29 17:05:47
Message-ID: 20140129170547.2191.45912 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Jan. 29, 2014, 1:50 p.m., Aaron J. Seigo wrote:
> > this patch doesn't actually improve anything. in fact, the actual bug is left:
> > 
> > pixmapCache = new KImageCache(pixmapCacheFileName, config.themeCacheKb() * 1024);
> > 
> > pixmapCacheFileName should have the version # in it. this was an oversight on my \
> > part when fixing br320855 in 59e88c777b92935cc95f28e52f84fe97563dec9d 
> > this patch should not go in as is, but instead have the cache file name ammended \
> > to include the version information.
> 
> Harald Sitter wrote:
> the point of this patch is not to fix cache versioning but cache cleaning such that \
> http://i.imgur.com/v0Zyees.png does not happen. further more as mentioned in the \
> description, fixing the cache versioning goes beyond the KImageCache construction \
> but also requires the entire logic to be created for the svgelements cache. to that \
> extent this patch is nothing but a hotfix and a step towards correct cache \
> handling, not a complete fix. 
> Aaron J. Seigo wrote:
> "fixing the cache versioning goes beyond the KImageCache construction but also \
> requires the entire logic to be created for the svgelements cache." 
> right; so what should be happening is that the image cache and the elements cache \
> should both be created with the version number in their name. that keeps them in \
> sync with each other and with the current contents of the theme. 
> the cache file is indeed being created w/out the version # in it, which is a \
> regression introduced in 59e88c777b92935cc95f28e52f84fe97563dec9d. putting the \
> version # back in the cache file name should be sufficient. 
> then in discardCache the version string used in the image cache filename should \
> also be used to initialize svgElementsCache. 
> probably the easiest way to manage this is to add a member to the Private class for \
> the version # string..

something like this: http://pastebin.kde.org/p6czlim0q


- Aaron J.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115326/#review48535
-----------------------------------------------------------


On Jan. 28, 2014, 9:18 a.m., Harald Sitter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115326/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2014, 9:18 a.m.)
> 
> 
> Review request for Plasma, Aaron J. Seigo and Martin Klapetek.
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> - introduce svgelements cache handling in useCache()
> - to decide whether or not to discard a cache type now the mtimes of \
> metadata.desktop and the respective cache file are compared (previously this was an \
>                 invalid file compared to cache change time)
> - cache cleanup now happens entirely before creation of the KImageCache instance to \
> prevent any sort of problem there 
> - add fixme comment about broken version-based cache handling. for one the version \
> specific file name is not actually used for the KImageCache and for another the \
> entire shebang is missing from svgelements all together. this has the very \
> unfortunate side effect that the *active* cache files are deleted ever so often, it \
> may be worth removing the code portions until someone finds time/interest to \
> actually implement this in a working fashion. 
> 
> Diffs
> -----
> 
> plasma/theme.cpp cb44878 
> 
> Diff: https://git.reviewboard.kde.org/r/115326/diff/
> 
> 
> Testing
> -------
> 
> upgraded from 4.8 straight to 4.12 -> theme caches correctly discarded
> 
> 
> Thanks,
> 
> Harald Sitter
> 
> 


[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="https://git.reviewboard.kde.org/r/115326/">https://git.reviewboard.kde.org/r/115326/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On January 29th, 2014, 1:50 p.m. UTC, <b>Aaron J. \
Seigo</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">this patch doesn&#39;t actually improve anything. in fact, the actual \
bug is left:

 pixmapCache = new KImageCache(pixmapCacheFileName, config.themeCacheKb() * 1024);

pixmapCacheFileName should have the version # in it. this was an oversight on my part \
when fixing br320855 in 59e88c777b92935cc95f28e52f84fe97563dec9d

this patch should not go in as is, but instead have the cache file name ammended to \
include the version information.</pre>  </blockquote>




 <p>On January 29th, 2014, 2:48 p.m. UTC, <b>Harald Sitter</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">the point of this patch \
is not to fix cache versioning but cache cleaning such that \
http://i.imgur.com/v0Zyees.png does not happen. further more as mentioned in the \
description, fixing the cache versioning goes beyond the KImageCache construction but \
also requires the entire logic to be created for the svgelements cache. to that \
extent this patch is nothing but a hotfix and a step towards correct cache handling, \
not a complete fix.</pre>  </blockquote>





 <p>On January 29th, 2014, 4:52 p.m. UTC, <b>Aaron J. Seigo</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">&quot;fixing the cache \
versioning goes beyond the KImageCache construction but also requires the entire \
logic to be created for the svgelements cache.&quot;

right; so what should be happening is that the image cache and the elements cache \
should both be created with the version number in their name. that keeps them in sync \
with each other and with the current contents of the theme.

the cache file is indeed being created w/out the version # in it, which is a \
regression introduced in 59e88c777b92935cc95f28e52f84fe97563dec9d. putting the \
version # back in the cache file name should be sufficient.

then in discardCache the version string used in the image cache filename should also \
be used to initialize svgElementsCache.

probably the easiest way to manage this is to add a member to the Private class for \
the version # string..</pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">something like this: \
http://pastebin.kde.org/p6czlim0q </pre>
<br />










<p>- Aaron J.</p>


<br />
<p>On January 28th, 2014, 9:18 a.m. UTC, Harald Sitter wrote:</p>








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

<div>Review request for Plasma, Aaron J. Seigo and Martin Klapetek.</div>
<div>By Harald Sitter.</div>


<p style="color: grey;"><i>Updated Jan. 28, 2014, 9:18 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</div>


<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;">- introduce svgelements cache handling in useCache()
- to decide whether or not to discard a cache type now the mtimes of metadata.desktop \
and the respective cache file are compared (previously this was an invalid file \
                compared to cache change time)
- cache cleanup now happens entirely before creation of the KImageCache instance to \
prevent any sort of problem there

- add fixme comment about broken version-based cache handling. for one the version \
specific file name is not actually used for the KImageCache and for another the \
entire shebang is missing from svgelements all together. this has the very \
unfortunate side effect that the *active* cache files are deleted ever so often, it \
may be worth removing the code portions until someone finds time/interest to actually \
implement this in a working fashion.</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;">upgraded from 4.8 straight to 4.12 -&gt; theme caches correctly \
discarded</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>plasma/theme.cpp <span style="color: grey">(cb44878)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/115326/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