[KPhotoAlbum] Very experimental image-grouping patch
rlk at alum.mit.edu
Wed Nov 28 13:59:08 CET 2007
Date: Wed, 28 Nov 2007 13:47:39 +0100
From: "Paul Fleischer" <paul at xpg.dk>
Cc: jkt at gentoo.org, KPhotoAlbum at kdab.net
Content-Type: text/plain; charset=ISO-8859-1
2007/11/28, Robert Krawitz <rlk at alum.mit.edu>:
> Date: Wed, 28 Nov 2007 13:08:34 +0100
> From: "Paul Fleischer" <paul at xpg.dk>
> > I haven't checked the code thouroughly yet, but it seems to me that we can
> > generate this mapping after having parsed the XML file. I have nothing
> > against having memory structures a "bi-directional list", but I'd like to
> > avoid it in the XML db.
> I understand. Only disadvantage by doing it after having parsed the
> XML file, is that it requires running through all images again, to
> establish the parent/child relation. But I guess, that this doesn't
> really matter.
> We should make sure that this doesn't have performance implications on
> large databases (20,000~50,000 images).
True. Something tells me that the only way to avoid running through
every image twice (one for loading, and one for reparenting), is to
build a list of children while loading the images. Then only those
images would be processes twice.
On the other hand, running through 50,000 images in-memory might not
take very long.
Anyone has comments on this?
It depends upon what you're doing with those 50,000 images. If you're
looking at a large number of other images for each of those images,
it's going to be slow. If you're going to hit the disk for each of
those images (check if it's present), it's going to be very slow
indeed. If you're just checking an in-memory flag, it might not be so
Can you write out the algorithm in pseudo-code?
More information about the KPhotoAlbum