TutteInstitute / datamapplot

Creating beautiful plots of data maps
MIT License
449 stars 29 forks source link

Potential memory leak #7

Open cakiki opened 4 months ago

cakiki commented 4 months ago

Not sure whether I'm doing anything wrong (Will have more time to investigate later this week) but when I create a datamapplot from a ~205K dataset it consumes memory (between 40 and 50GB in my usecase) that it never releases, such that a second run of the same command causes an OOM.

lmcinnes commented 4 months ago

Ouch! That sounds pretty bad. Was it a static plot, or an interactive plot? I can't think of anything in the static plotting code that would hold memory like that; possibly the matplotlib figure in some cases? If you can share a reproducer that would be appreciated.

cakiki commented 4 months ago

It was a static plot, and I was not assigning fig and ax to variables. I'll try to see if I can figure out what's happening, if not, I'll share a script to reproduce!