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

GH-124567: Reduce overhead of debug build for GC. Should help CI performance #126777

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Nov 13, 2024

The doctests CI takes ages and it uses a debug build.

Arguably debug builds should be good for debugging, i.e. lots of asserts. If you want performance don't use a debug build.

However, the incremental GC does adds a lot of extra sanity checks and it is a pain if CI jobs take half an hour or more.

So, this PR adds an extra debug option to reduce the amount of checking done in a normal debug build, but keeps the extra sanity checks if needed for debugging the GC.


📚 Documentation preview 📚: https://cpython-previews--126777.org.readthedocs.build/

@markshannon
Copy link
Member Author

Reduces the time it takes CI to run the Doc/Doctest job by ~40%.

@markshannon markshannon marked this pull request as ready for review November 13, 2024 12:00
@pablogsal
Copy link
Member

Not opposing to this but this will mean that debug builds that are redistributed won't have GC list validation so linked list corruption will be more difficult to debug when users leverage debug builds of the interpreter.

@markshannon
Copy link
Member Author

This only removes the extra asserts added for the incremental GC, the original list validations from 3.13 are still present.

@pablogsal
Copy link
Member

This only removes the extra asserts added for the incremental GC, the original list validations from 3.13 are still present.

Sorry I was confused by the diff

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Looks good. I'm guessing validate_list is the cheapest (or most useful) check?

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

Successfully merging this pull request may close these issues.

3 participants