TL;DR - upgrading Pillow to 6.2.1 seems to have stopped the leak.

I was able to replicate with a modified version of wee_reports. This 
allowed me to reproduce the problem quicker. I was able to narrow down the 
problem to calls to draw.textsize and draw.text.  Some additional research 
lead me to this issue, https://github.com/python-pillow/Pillow/issues/2629 
- which clinched the decision to upgrade Pillow.

With Pillow 4.0.0, generating the plot 2500 times resulted in this memory 
usage.

[image: weekMemoryUsage.png]

With Pillow 6.2.1, generating the plot 2500 times resulted in this memory 
usage.

[image: weekMemoryUsage.png]

Note, in both plots ignore the date/times. I just used the loop count as 
the time, so they start at epoch 0 or 1/1/1970 12 AM UTC...
- rich

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/88b8542d-6394-4591-9f68-e220feba35a3%40googlegroups.com.

Reply via email to