[KPhotoAlbum] Speed up new image load time

Robert Krawitz rlk at alum.mit.edu
Mon May 29 23:47:05 BST 2017


On Mon, 29 May 2017 17:27:49 -0400 (EDT), Robert Krawitz wrote:
> Some timings, for loading 1133 images:
>
>      	      Old 	  New
> 20 MP	      5:41	  0:32
...
> It looks like storing the EXIF data in the database takes about 3
> seconds.  The next big time consumer is file version detection; if I
> turn that off, the total time drops off to about 7 seconds.  At that
> point, in a realistic scenario, I'd likely be I/O-bound; if I were
> loading 3000 images (30 GB, typically), I'd need on the order of
> 250-300 seconds just to read the data from disk.  But if someone were
> storing their images on nVME, it might matter.

Well, there's some very low hanging fruit here: the modified file
detection computes the MD5 checksum of each file twice!  It's a very
simple matter to get rid of one of those; the time drops to about 20
seconds (which is consistent with what I saw running md5sum on all of
the files: it took about 10 seconds).
-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-dont-recompute-checksum.patch
Type: application/octet-stream
Size: 780 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20170529/bf36b853/attachment.obj>


More information about the Kphotoalbum mailing list