Skip to content

Commit 5d9a6d2

Browse files
committed
Try to reduce number of parallel AOT compilations
To check whether it will improve memory issues on CI
1 parent d5a0bc4 commit 5d9a6d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tasks/AotCompilerTask/MonoAOTCompiler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ private bool ExecuteInternal()
523523
}
524524
else
525525
{
526-
int allowedParallelism = DisableParallelAot ? 1 : Math.Min(_assembliesToCompile.Count, Environment.ProcessorCount);
526+
int allowedParallelism = DisableParallelAot ? 1 : Math.Min(_assembliesToCompile.Count, Math.Max(1, Environment.ProcessorCount/2));
527527
if (BuildEngine is IBuildEngine9 be9)
528528
allowedParallelism = be9.RequestCores(allowedParallelism);
529529

0 commit comments

Comments
 (0)