Hashing videos

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Tue May 22 13:45:44 PDT 2018


Dear all,

I'm currently implementing addition of videos to the dive photos. This happens 
to be dog-slow, because we calculate hashes of the file contents. As you can 
imagine, addition of multiple videos with a few GB each is a major CPU hog. 
Granted, the UI stays responsive, since this is done in background threads. 
Nevertheless, it gives a bad impression if the CPUs run at 100% for a few 
minutes.

What are we supposed to do? Hash only the first MB? That would unfortunately 
not be backwards-compatible. Do different things for images and videos? Sounds 
hard to get right.

Or perhaps even remove the hashes? I found three users:
1) In git storage. This is unsupported afaik.
2) The "Find moved images" functionality. Perhaps searching for (case-
insensitive?) filenames is enough? Or perhaps match by metadata?
3)  In current head it is also used for the thumbnail files, but this could be 
changed before doing the next release.

Ideas?

Berthold


More information about the subsurface mailing list