[KimDaBa] Options::addOption() performance ?

mike tuffs tuffsfamily at mac.com
Mon Oct 17 19:29:25 BST 2005


Whilst initially loading a library, a lot of time, growing 
exponentially as more images are loaded,
seems to be spent in this routine:
{
if ( _options[key].contains( value ) )
        _options[key].remove( value );
      else
          emit changed()();
      _options[key].prepend( value );
}

As the key value pairs seem to be key ="Folder" & value = "<the folder 
that the file is in>",
the remove function gets called many times.
The _options is a map, with a Qstring as key, and a QStringList as 
value; is the above
function trying to create a key "Folder" with the value "list of all 
available folders" ?

for > 100000 entries the above slows down pretty quickly. Any comments 
for how to improve this (maybe by caching the folder name for 
successive images, perhaps? , would be appreciated.

Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1113 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20051017/a5859b1f/attachment.bin>


More information about the Kphotoalbum mailing list