[KimDaBa] Options::addOption() performance ?

Jesper K. Pedersen blackie at blackie.dk
Thu Oct 20 09:41:37 BST 2005


Thanks for the input, I'm currently without sparetime currently, but as soon 
as I get some kimdaba time, I will have a look at it.

Cheers
Jesper.

On Monday 17 October 2005 14:29, mike tuffs wrote:
| 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

-- 
Jesper K. Pedersen          |  Klarälvdalens Datakonsult
Senior Software Engineer    |  www.klaralvdalens-datakonsult.se
Prinsensgade 4a st.         |
9800 Hjørring               |  Platform-independent
Denmark                     |  software solutions




More information about the Kphotoalbum mailing list