worldveil / dejavu

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

RAM eating up #238

Open t12ouble opened 3 years ago

t12ouble commented 3 years ago

I'm using MySQL on both a local db with a few songs and an AWS RDS instance with 1500 songs. The amount of RAM used grows exponentially during the recognition phase on Python 3 version compared to the 2.7 one. I was wondering if the problem could be the difference between the two Python versions, i.e. In CommonDatabase > return_matches(), the use of YIELD in the older version. Debugging a little on the Python 3 version, I noticed that the raising of RAM used is caused by the last for loop at the 209 row in CommonDatabase > return_matches(), which, at the end, returns the entire Dict which is, in my case, something like 8 Milion rows.

Is there any advice you can suggest me to improve recognition performance, computing time and RAM used?