Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
mason/emitter: emit pkgs in parallel
Browse files Browse the repository at this point in the history
Quick n' Dirty Benchmarks
glibc : 28s -> 8s
curl  : 1.17s -> 668ms
nano  : 451ms -> 311ms

Sub task of #41.
  • Loading branch information
joebonrichie committed Feb 27, 2023
1 parent cf2d45e commit 94aae28
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/mason/build/emitter.d
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ public class BuildEmitter
void emit(const(string) outputDirectory, Analyser analyser) @system
{
import std.algorithm : each;
import std.parallelism : parallel;

foreach(p; packages.values.parallel)
{
emitPackage(outputDirectory, p, analyser);
}

packages.values.each!((p) => emitPackage(outputDirectory, p, analyser));
binaryManifest.write();
jsonManifest.write();
}
Expand Down

0 comments on commit 94aae28

Please sign in to comment.