Hi Brice!

On 7/8/07, Brice Goglin <[EMAIL PROTECTED]> wrote:

I did some testing on a directory containing 1000 jpeg images. I am only
timing the "listing entries" part since this is where identify is
called. The next part might be much longer because it generates
thumbnails and scaled images (but it is generally only done once, not
when regenerating a new gallery).

1) with a regular llgal 0.13.12, it takes:

real    1m41.503s    user    1m15.733s    sys     0m11.617s

Well, I think you have a faster computer than me :) Or maybe you're
using small images? Remember that nowadays 7-9 megapixel consumer
grade cameras are pretty common. The problem with identify is that for
some obscure reason, takes time proportionally to the image size.

In my desktop (1,7ghz cpu), running identify * (so no extra fork
penalty) in a directory with 189 images (7 megapixel each), takes
146.230s.

A full llgal run without the identify in the same dir, takes 13.759s.
So it's and order of magnitude less.

You can imagine how long it takes in my webserver which has a 500mhz
cpu! And the main point is that this is executed each time, even if I
already had build the captions catalog.

Really, if it wasn't for my modification, I'd have dropped llgal
already, because is inusable for me.

3) when using 'file' instead of 'identify' (and without writing the code
to parse the output of file, which is not trivial since I support
multiple image types):

maybe file -i which gives an easily parseable mime type, but you still
have to fork out

5) with the Image::Infos perl library (seems to detect broken images
well too):

real    0m1.444s     user    0m0.672s    sys     0m0.560s

this seems the real contender!

(4) is already a very nice improvement and has the advantage of being
very easy to integrate in the current code. But the best seems to be (5)
and it should be easy to integrate too. However, there's only a 16s
difference between them, which means about 1 second for 60 images. If
ExifTool brings other interesting advantages, it might be worse using it
anyway even if it is a little bit slower. I'll look at all this more
deeply and release a new llgal in the near future.

Well it's not a 16s difference, it's 12 times faster!! It is really a
huge difference.

Anyway, I'll try to run such a test before new releases in the future, I
didn't expect such a timing difference (even if running llgal on 1000
images is probably not so common :)

Not so... I have thousand of images in my current gallery setup, which
I want to replace. People with digital cameras tend to take lots of
pictures :)

regards, Martín.

--
Martín Ferrari

Reply via email to