Skip to content

Optimize memory usage for unknown enums - #167

Open
anuraaga wants to merge 1 commit into
bufbuild:mainfrom
anuraaga:intenum-lessmemory
Open

anuraaga wants to merge 1 commit into
bufbuild:mainfrom
anuraaga:intenum-lessmemory

Conversation

@anuraaga

Copy link
Copy Markdown
Collaborator

Currently we set name/value directly on unknown enum instances which allocates a __dict__. This is actually unnecessary if we store on the class itself. This is good reduction but notably improves allocation budget tracking / general DoS robustness.

@anuraaga
anuraaga requested a review from ajeetdsouza November 16, 2026 06:47

This branch has not been deployed

No deployments
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.

1 participant