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

Try to disable the GC in DMCompiler #2070

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

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Oct 28, 2024

This PR attempts to disable the garbage collector during compilation if sufficient memory is available. It's no guarantee and it's currently set to disable the GC if ~4.5 GB is available. This is to give us some breathing room on top of the ~3.9 GB of total allocs for compiling TG currently.

Note that this memory value does not cause it to allocate the specified amount of memory nor cause any sort of issues if that amount of memory isn't available. It'll just run the GC in that case.

This takes TG from a consistent 22s down to 18s on my machine, and Paradise from 13s to 11s.

Added a --use-gc compiler arg if people want the old behavior for some reason.

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Oct 28, 2024
@ike709 ike709 requested a review from wixoaGit October 28, 2024 23:15
@wixoaGit
Copy link
Member

I'd like to try reducing the largest allocators before doing this.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

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/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants