-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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-90699: Intern statically allocated strings #93597
Conversation
🤖 New build scheduled with the buildbot fleet by @kumaraditya303 for commit f0e01c4 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Should Lines 69 to 71 in 243ed54
A |
That file also contains handwritten struct initialization macros so I don't think so. |
Yeah, only I suppose we could separate the generated part from the rest, AKA pycore_global_objects_init.h (or even _pycore_global_objects_init.h). I doubt that would be a problem, especially if it makes occasional PRs a little easier to review (e.g. no ambiguity about what is generated and what itsn't). |
Would we also move the generated parts of pycore_global_strings.h to a separate header file (for the same reasons)? |
With this PR, ~93% of the lines in A |
I can work on a PR to separate the generated and handwritten code but it will be a separate PR. I have other changes enqueued for static strings which depend on this PR so I want to get this in first. |
@ericsnowcurrently FYI, I have created #94051 to separate generated code. |
I'm hoping Eric can do the review here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly looks good. I just have a few comments.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for make those updates! This is just about ready. I'll approve and merge it once you've merged in the gh-94051 changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for working on this, @kumaraditya303! |
Thanks for the reviews! |
This is similar to how strings are interned for deepfreeze.
Automerge-Triggered-By: GH:ericsnowcurrently