Optimizing purge_non_existing_images script

Hello,

I was doing a big clean up of my stored images and when I run the database cleaner and… well, it was painfully slow. Did some test with the script and found two “problems”:

  1. The filecheck in bash is slow
  2. Removing the image reference was instruction by instruction, not as a transaction… really slow

So, I made some changes for the bash script and also rewrite the script in python, you can check it in my github repository. I will read the wiki to know to contribute as soon as I have some spare time. Meanwhile, you can check it out.

2 Likes