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

Convert some ProcJson classes to structs #2135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Dec 10, 2024

I see no reason to allocate a morbillion classes on the heap for what could easily be structs. I don't have dotmemory anymore to measure the exact memory alloc reduction, but not allocating all of these classes will definitely be less memory.

Also converts set; to init; everywhere the IDE suggested, and fixed a warning for a missing Equals().

Tested that TG doesn't explode with these changes.

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant