[Shotwell] MD5 fields in PhotoTable

Bruno Girin brunogirin at gmail.com
Tue Jun 22 04:56:14 PDT 2010


On Tue, 2010-06-22 at 12:48 +0200, Peter DO Smith wrote:
> OK, I see the answer in line 697 of BatchImport.vala
> But why not simply do a full file MD5 all the time? Or is this to save
> processing time?

Not just processing time, it's for general performance. When you are
dealing with photos in the library, the difference is probably
negligible. However, when you are dealing with import, you have to take
into account that the photograph you import may take a long time to
download: a USB connection to a camera is a lot slower than disk access
and it would be even worse the day you allow imports from an external
service over the network for instance.

So by having a thumbnail hash, you only need to load the thumbnail in
order to calculate the hash. That way, you can check for duplicates
without having to load the whole picture, which could take a very long
time for large RAW files (definitely several seconds per image on my
Canon EOS 5D and I may have hundreds of them on a 8GB card). And in
terms of user experience, it's better to be able to tell users "this
photograph has already been imported" before loading it rather than
after.

Bruno





More information about the Shotwell mailing list