MNT: optionally collect gc in memleak.py#25500
MNT: optionally collect gc in memleak.py#25500richardsheridan wants to merge 1 commit intomatplotlib:mainfrom
Conversation
9f76be1 to
1586803
Compare
|
It was previously on always, but this now disables it by default. Do we want to change that? The release manager guide probably needs an update as well. |
|
I figure the script should reflect the way memory grows in matplotlib, and subsequent to #23712 that means not interfering with gc heuristics. I left the gc option available since it now takes a while to observe the long term trend and someone may want to smooth out the gc bumps for a short term measurement. |
|
For context, the output is actually quite qualitatively different (I did a shorter 100 test rather than the standard from the release docs which is 1000, but still) Without explicit gc.collect: So, without calling gc.collect, memory usage is higher and pymalloc/total objects oscillate with a period of ~4. |


PR Summary
Follow up to #23712. It's quite enlightening to see the effect of collecting or not collecting on this test script.