Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 61: add option allowing specifying gc collect generation #63

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

71FIL
Copy link

@71FIL 71FIL commented Jul 27, 2021

I am proposing this to address issue #61. It is proposed as a draft as I was considering an alternative implementation.

The proposed change here adds the gc_collect_gen argument to all functions which end up calling gc.collect().

An alternative implementation would be to add a single configuration function to objgraph, eg. set_gc_collect_gen, to set a global variable in objgraph which would then be used in all calls to gc.collect().

I am assuming that this will become version 3.6.0.

Let me know what you think!

@71FIL 71FIL marked this pull request as ready for review August 1, 2021 19:42
Copy link
Owner

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delayed reply. (I was on vacation, which unfortunately was too short to resolve my burnout issues.)

I like this. Some of the docstrings are missing the .. versionchanged:: directive mentioning the new parameter. I mentioned some of them, but there are more where I ran out of time.

If that's fixed, I'll merge this right away.

(I wouldn't have liked the global parameter.)

objgraph.py Show resolved Hide resolved
objgraph.py Show resolved Hide resolved
objgraph.py Show resolved Hide resolved
@71FIL
Copy link
Author

71FIL commented Aug 12, 2021

No worries! Sorry to hear about the burnout issues...

I think I covered them all.

Let me know if there is anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants