worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.35k stars 1.43k forks source link

Trying to fingerprint about 200 000 files. After 15000 files INSERT operation is very slow. #284

Open unbrokendub opened 1 year ago

unbrokendub commented 1 year ago

Hi all. I stuck when trying to fingerpint big database of music. Becouse of the billions of indexes generated, INSERT operation take super big amount of time. In example first 3000 files on emtpy database (i use postgres) been ready in 3 hours. But after 15000 files added another 3000 files takes more than 10 hours, and looks like time will grow exponencialy. Is there any tweaks to hussle with indexes or maybe it is possible to run dejavu without indexes?

Cheers Denis

busterbeam commented 1 year ago

If you don't need to use a database. Then just modify the main code to what you want it to do

https://github.com/worldveil/dejavu/blob/e56a4a221ad204654a191d217f92aebf3f058b62/dejavu/logic/fingerprint.py#L21-L156

the main logic is in the fingerprint.py