[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:       "Harald Sitter" <sitter () kde ! org>
Date:       2014-01-30 12:19:35
Message-ID: 20140130121935.32672.36393 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

(Updated Jan. 30, 2014, 12:19 p.m.)


Status
------

This change has been discarded.


Review request for Plasma, Aaron J. Seigo and Martin Klapetek.


Repository: kdelibs


Description
-------

- to decide whether or not to discard a cache type now the mtimes of metadata.desktop \
and the pixmap cache file (previously this was an invalid file compared to cache \
                change time)
- the discard check now compares the mtime of the actual pixmap cache file and the \
actual metadata file to ensure that we are comparing values with equal meaning \
(previously the kimagecache modification time was used  which appears to be the \
                creation time of the object by default)
- whether the cache needs to be discard is decided before kimagecache is created to \
avoid it altering the mtime, actual discarding still happens after initialization of \
                the pixmap cache
- introduced a new themeVersion member on the private class
- svgelements cache is now using a versioned cache file whenever themeVersion is not \
                empty
- introduce svgelements cache maintenance in useCache()
- pixmap cache is now using a versioned cache file whenever themeVersion is not empty \
                (previously the wrong name var was used)
- various variables inside useCache had their names adjusted to clearify their \
purpose.


Diffs
-----

  plasma/theme.cpp cb44878 

Diff: https://git.reviewboard.kde.org/r/115326/diff/


Testing
-------

cache file lineup:
  cache/plasma-svgelements-default
  cache/plasma-svgelements-default_v1.9
  cache/plasma-svgelements-default_v2.0 (no pix cache)
  cache/plasma_theme_default.kcache
  cache/plasma_theme_default_v1.9.kcache
  cache/plasma_theme_default_v2.1.kcache (no svg cache)

version of default theme for testing: 2.2

[T1] initial run without v2.2 caches:
deleted all previous caches, correctly created plasma-svgelements-default_v2.2 and \
plasma_theme_default_v2.2.kcache.

[T2] subsequent run with v2.2 cache present:
deleted all prevoius caches, existing v2.2 cache not deleted or discard by \
useCache().

[T3] subsequent run with v2.2 cache present and `touch metadata.desktop`:
deleted all prevoius caches, existing v2.2 cache not deleted, but discarded by \
useCache().

[T4] subsequent run with v2.2. cache, but default theme has no version anymore:
deleted *all* caches, discarded (newly created) empty caches \
plasma-svgelements-default and plasma_theme_default.kcache.


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 />



<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray \
solid;">  <tr>
  <td>
   <h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been \
discarded.</h1>  </td>
 </tr>
</table>
<br />


<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. 30, 2014, 12:19 p.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;">- to decide whether or not to discard a cache type now the mtimes of \
metadata.desktop and the pixmap cache file (previously this was an invalid file \
                compared to cache change time)
- the discard check now compares the mtime of the actual pixmap cache file and the \
actual metadata file to ensure that we are comparing values with equal meaning \
(previously the kimagecache modification time was used  which appears to be the \
                creation time of the object by default)
- whether the cache needs to be discard is decided before kimagecache is created to \
avoid it altering the mtime, actual discarding still happens after initialization of \
                the pixmap cache
- introduced a new themeVersion member on the private class
- svgelements cache is now using a versioned cache file whenever themeVersion is not \
                empty
- introduce svgelements cache maintenance in useCache()
- pixmap cache is now using a versioned cache file whenever themeVersion is not empty \
                (previously the wrong name var was used)
- various variables inside useCache had their names adjusted to clearify their \
purpose. </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;">cache file lineup:  cache/plasma-svgelements-default
  cache/plasma-svgelements-default_v1.9
  cache/plasma-svgelements-default_v2.0 (no pix cache)
  cache/plasma_theme_default.kcache
  cache/plasma_theme_default_v1.9.kcache
  cache/plasma_theme_default_v2.1.kcache (no svg cache)

version of default theme for testing: 2.2

[T1] initial run without v2.2 caches:
deleted all previous caches, correctly created plasma-svgelements-default_v2.2 and \
plasma_theme_default_v2.2.kcache.

[T2] subsequent run with v2.2 cache present:
deleted all prevoius caches, existing v2.2 cache not deleted or discard by \
useCache().

[T3] subsequent run with v2.2 cache present and `touch metadata.desktop`:
deleted all prevoius caches, existing v2.2 cache not deleted, but discarded by \
useCache().

[T4] subsequent run with v2.2. cache, but default theme has no version anymore:
deleted *all* caches, discarded (newly created) empty caches \
plasma-svgelements-default and plasma_theme_default.kcache.</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