OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Try to disable the GC in DMCompiler

Open ike709 opened this issue 1 year ago • 1 comments

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.

ike709 avatar Oct 28 '24 23:10 ike709

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

wixoaGit avatar Oct 29 '24 00:10 wixoaGit

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

github-actions[bot] avatar Nov 12 '24 01:11 github-actions[bot]

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

github-actions[bot] avatar Nov 15 '24 23:11 github-actions[bot]