SwoopSearch / pyaddress

pyaddress is an address parsing library, taking the guesswork out of using addresses in your applications. We use it as part of our apartment search and apartment spider applications.
BSD 3-Clause "New" or "Revised" License
100 stars 43 forks source link

Memory Leak in parse_address #9

Open boxbeatsy opened 8 years ago

boxbeatsy commented 8 years ago

I just wanted to leave a note that we confirmed a fairly large memory leak associated with parse_address in our Heroku/Django application. Using heapy in a heroku bash shell, we deduced that the cities.csv file was continually being loaded and saved in memory. We didn't have the resources to find a workaround, so we moved to another package, but I wanted to file this ticket in case it flags the issue for anyone in the future who can save some time.

brephophagist commented 8 years ago

What package, if you don't mind sharing? 😉

funk44 commented 7 years ago

malloc traceback also confirmed the leak was on the cities.csv being loaded into memory in a loop

I wasn't parsing the city and i didnt have time to debug the code so i just commented out lines 57 to 60 which called the function to load the csv