[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/sites/kphotoalbum
From: Jesper Pedersen <blackie () blackie ! dk>
Date: 2013-02-03 15:45:55
Message-ID: 20130203154555.7F554AC86E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1337156 by blackie:
added news entry
M +42 -75 news.rss
A news/0081
--- trunk/www/sites/kphotoalbum/news.rss #1337155:1337156
@@ -15,8 +15,46 @@
<item>
+<title>A Productive weekend - Saving now 3-4 times faster</title>
+<pubDate>3 Feb 2013 16:30:00 +0100</pubDate>
+<guid>http://www.kphotoalbum.org/index.php?page=news#item0081</guid>
+<link>http://www.kphotoalbum.org/index.php?page=news#item0081</link>
+<description>
+<p>This week we discussed saving times on the KPhotoAlbum IRC channel,
+which made me give it a shot at rewriting the saving code from QDom to
+QXmlStreamWritter. I had a hunch that it would give quite some nice
+improvement in saving speed.</p>
+
+<p>Now, if you have ever participated in one of my Qt training classes, you
+will likely have heard me say something like <i>NEVER EVER trust your own
+hunches on where time is spend in your applications, USE A
+PROFILER!</i>. Rewriting the code resulted in a disappointing 10% time
+reduction on saving, not the 50% or more I had hoped for. Sigh! Why do I
+never listen to myself?!</p>
+
+<p>OK, so when I had callgrind and kcachgrind in action anyway, I could
+just as well look at what made it relatively slow at saving, and I found,
+not surprisingly, that it spend quite a bit of time in places I wouldn't
+have guessed in a million years. I got an impression 18% reduction simply
+by caching whether the XML file should be in compressed or readable
+format.</p>
+
+<p>In total, depending on format used, and whether your KPhotoAlbum is
+build in debug or release mode, I got a reduction of time spend when
+saving between 62% and 73%, which means a speed up of 3-4.</p>
+
+<p>Saving now takes less than 400ms on my database with 13800 images (of
+which more than 95% are tagged). I guess it will be a while before I need
+to revisit the speed of saving :-)</p>
+
+<p class="author">— Jesper</p>
+</description>
+</item>
+
+
+<item>
<title>KPhotoAlbum 4.3</title>
-<pubDate>26 Sep 2012 06:15:00 +0300</pubDate>
+<pubDate>26 Sep 2012 06:40:00 +0300</pubDate>
<guid>http://www.kphotoalbum.org/index.php?page=news#item0080</guid>
<link>http://www.kphotoalbum.org/index.php?page=news#item0080</link>
<description>
@@ -25,12 +63,9 @@
4.3</a> available for download.
</p>
<p>
-New features concentrate on video support improvements and background
-tasks. Also the database backend has been dropped completely leaving the
-XML backend as the only option. Automatic stacking of images based on
-file version detection has been brought to the maintenance menu giving
-control to the user instead of only performing the action upon starting
-of KPhotoAlbum.
+<a href="#item0079">New features</a> were described when announcing the
+beta version. Only minor bug fixing and addition of pattern based search
+was done since then.
</p>
<p class="author">— Miika</p>
</description>
@@ -200,74 +235,6 @@
</item>
-<item>
-<title>Summer vacation means much faster thumbnail viewer.</title>
-<pubDate>16 Aug 2010 09:00:00 +0100</pubDate>
-<guid>http://www.kphotoalbum.org/index.php?page=news#item0071</guid>
-<link>http://www.kphotoalbum.org/index.php?page=news#item0071</link>
-<description>
-<p>I've just returned from one week of vacation on Zakynthos in Greece, and the
-result is the same as every year of summer vacation - a lot of time to
-spent on KPhotoAlbum :-)</p>
-<p>This year I rewrote the thumbnail viewer from the old Q3IconView to
-Qt4's QListView, and while I was at it (and yes that was really my starting
-point), I optimized the loading of thumbnails quite a bit. We are talking
-about orders of magnitude here!</p>
-
-<h2>The technical details - in case you care</h2>
-<p>Just prior to my vacation I experienced with storing thumbnails in one
-large file, which is much faster to load than storing each thumbail in a
-file of their own. <a href="http://www.kdedevelopers.org/node/4295">See the
-details in my blog</a></p>
-
-<p>This is what I do now, but that really only contribute to a minor part
-of the speed up, it turned out that thumbnails was scaled when loaded from
-the cache - at the time that seemed like a good idea, but the result was
-that each thumbnail costed an extra 10 msec - which amounts to a whole
-second for 100 thumbnails. Now the images in the cache has the actual size
-needed. This means that it is flushed each time you resize the thumbnail -
-so stop doing that a lot :-)</p>
-
-<p>Another slowdown was the drawing of the 3D effect around each
-thumbnail. By changing that from drawing 5 rectangles to drawing 5 filled
-rectangles, I got a huge speedup :-)</p>
-
-<h2>What are the catch?</h2>
-<p>So is this all great, no catch?, well there is a few minor ones.</p>
-<ul>
-<li>We are storing the thumbnails in our own format now, so other
- application wont be able to reused them - anyway, that has been so for
- a few years already, so no big deal.</li>
-<li>Thumbnails needs to be recreated when thumbnail size is
- changed. This was the price we had to pay for this, as the
- alternative, which we used before, was to store the images in say
- 256x256, and then scale them down, but that was exactly what costed a
- lot.</li>
-<li>When you resize the thumbnails, new thumbnails are generated for all
-the videos too. As the thumbnail for the videos are a random screenshot from
-the video, this means that it will change each time, which might make it
-harder to recognize them.</li>
-<li>The old selection model of the thumbnail viewer has been replaced with
- QListView's version. This means you do rectangle selections with the
- mouse. I might rework that to use our own selection method again later
- on, if there is a public demand for it.</li>
-<li>I'm sure I've introduced a lot of new bugs :-)</li>
-</ul>
-
-<h2>What are the advantages?</h2>
-<ul>
-<li>Much much faster - we are talking about smoooth scrolling now,
- something like going over say 5-10 pages of thumbnails per second,
- where the old implementation took perhaps 1-2 second per page.</li>
-<li>The code has been rewritten to use Qt 4's QListView, which means a lot
- of code had been cleaned up - to the end user this means fewer lines
- for us developers to add bugs to :-)</li>
-</ul>
-</description>
-</item>
-
-
-
</channel>
</rss>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic