[KPhotoAlbum] Eliminating unneessary information in index.xml

Robert Krawitz rlk at alum.mit.edu
Mon Jun 5 02:15:13 BST 2017

There are several pieces of information in index.xml that aren't
really necessary in most cases:

* angle can default to 0 (or why is it needed at all if the file
  hasn't been rotated in KPA -- if the file doesn't have EXIF
  information and the file hasn't been manually rotated; if it has
  EXIF, it could just come from there if it's actually needed for

* endDate can default to startDate

* label can default to the base name of the file

This shaves off about 20% of the size from my index.xml (41 MB vs 53
MB) and saves about 1 second (maybe 7%) of startup time.

Obviously, if there's no setting to control this, it will break
forward compatibility (i. e. an older kpa won't be able to correctly
read a newer index.xml).  But we're at the point now where it's going
to be hard to get really big improvements.  I think we can get
probably 15-20% out of XMLDB::Database::Classify by a combination of
removing 2 of the 3 calls during startup and tuning what's going on in

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: 0006-optimize-index.patch
Type: application/octet-stream
Size: 3123 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20170604/de0e33a9/attachment.obj>

More information about the Kphotoalbum mailing list