[KPhotoAlbum] Performance issue: KPA too slow when clicking on"big" supercategories

Jesper K. Pedersen blackie at blackie.dk
Thu Dec 28 05:46:19 GMT 2006


On Thursday 28 December 2006 02:55, Lars Clausen wrote:
| Jesper K. Pedersen said:
| > Seems like you are right indeed. That just shows how little I use
| > subcategories myself.
| >
| > I spent the better of an hour profiling it, and came to the conclusion
| > that it
| > unfortunately is the algorithms that sucks rather than the
| > implementation. In
| > my database with ~7000 images, it takes billions of string compares to
| > search
| > for a large enough category :-/
|
| String compares?  You mean you don't intern the strings and use == to
| compare them?  If you use something other than C for your locale, string
| compare is egregiously expensive, otherwise it's just very expensive.
well I'd like to keep the code simple, so I dont want to do fancy string 
tricks before needed.
|
| > It is unfortunately too late to do something about that for the next
| > release.
| > I do, however, plan to spent some time to make a patch level release
| > after the next one, which will include bug fixes and optimizations only.
|
| Is there a description of the problem and the algorithm used somewhere
| online?  I'd like to give it a think.  Or else, where in the code should I
| look?
Well a bit all over the place I guess, but of course the DB subdirectory is 
full of it.

-- 
Having trouble finding a given image in your collection containing
thousands of images?

http://www.kphotoalbum.org might be the answer.



More information about the Kphotoalbum mailing list