[KimDaBa] About the renaming issue

Dario Spagnolo spada at zaup.org
Wed Jan 14 16:22:08 GMT 2004


Jesper K. Pedersen said:
> "Dario Spagnolo" <spada at zaup.org> writes:
>
> | Various options :
> |
> |  - the start-up checksum could be enabled by default but possible to
> | disable it via an option. This way, people with huge albums would
> disable
> | it and only run it when they really need it.
> |  - My PIII 650 laptop with a very slow disk performs md5 checksums at
> | 14,5Mb/s. If we only compute the md5 checksum on the first 10kb and the
> | last 10kb, this would allow me to process 10,000 images in more or less
> | 15 seconds. We might also be able to only take the first 5kb and the
> last
> | 5kb, which would allow me to process 10,000 images in 7,5 seconds.
> |
> | It has to be said that the it's, generally speaking, rather unlikely
> that
> | someone will store 10,000 images on a slow and therefore small hard disk
> | (mine is 10Gb). So we can assume that large albums will be stored on
> | relatively fast hard disks, let's say at least 25Mb/s (the fastest hard
> | disk I can test hdparm on, which is already 2 years old, gets 38Mb/s, so
> | 25 is a low profile situation). This would bring the best option down to
> 4
> | seconds.
> I'm still not sure your math work out correct, there is a small but
> existing time spent on opening/closing the file. I'm sure you will see
> that
> this time sums up to a real time you can feel if you do it say 10.000
> times.
>
> Cheers
> Jesper.
>
I admit this is all theory and I will make some tests to share with you
soon. But still, I don't think that the opening/closing operations will
add more than a couple of seconds to the total operation, so it shouldn't
spoil the whole thing.

Quick and dirty test :
$ time head -1 somefile

scores 0,005 seconds, which would take 50 seconds for 10,000 images. Let's
hope that C (C++?) compiled functions will score at least 10 times faster.

-- 
Dario Spagnolo
http://www.zaup.org



More information about the Kphotoalbum mailing list