Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MNT: optionally collect gc in memleak.py#25500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

richardsheridan
Copy link
Contributor

PR Summary

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

@richardsheridanrichardsheridan changed the titleoptionally collect gc in memleak.pyMNT: optionally collect gc in memleak.pyMar 19, 2023
@QuLogic
Copy link
Member

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.

@richardsheridan
Copy link
ContributorAuthor

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.

@ksunden
Copy link
Member

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:

agg

With explicit gc.collect:
agg-gc

So, without calling gc.collect, memory usage is higher and pymalloc/total objects oscillate with a period of ~4.
While calling gc.collect, memory usage and number of objects grow fairly linearly. (iirc they do plateau off further in, but takes longer to get to that plateau at least for rss)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@richardsheridan@QuLogic@ksunden@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp