Avoid fork and spawn when --threads=1
and use that for CI
#7397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR consists of two commits:
--threads=1
is passed. This is a general useful change because currently we are always spawning and forking for no reason in this case.--threads=1
when compiling the compiler and specs. This avoids allocating a bit more memory becausefork
seems to require that (when changes happen memory is copied) and, as shown in [DO NOT MERGE] Let's debug the compiler in the CI #7395, this makes some existing PRs that are failing now pass.Changing CI to
--threads=1
doesn't change completion time a lot, or at all, because most of the time is spent running the thousands of specs we have.This is obviously a change almost exclusive to let the CI handle bigger programs and spec suites. I'd like to eventually improve the compiler's performance and memory consumption but for now this is a bit hard. The best we can do right now is to make this change so the CI doesn't fail... it's mostly a problem that happens in CI because anyone with a more or less recent computer should be able to compile the compiler and all the specs just fine (I currently have a MacBook Pro Late 2013).