Skip to content

Commit 8a7a3df

Browse files
committed
run all actions in a single phase together
1 parent 2f5d3b9 commit 8a7a3df

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/src/generate/build_impl.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,15 +384,14 @@ class BuildImpl {
384384
/// dirty unlike [outputs] which only gets files which were explicitly
385385
/// generated in this build.
386386
final phaseOutputIds = new Set<AssetId>();
387-
for (var action in phase) {
387+
388+
await Future.wait(phase.map((action) async {
388389
var inputs = _matchingInputs(action.inputSet);
389-
// TODO(jakemac): Optimize, we can run all the builders in a phase
390-
// at the same time instead of sequentially.
391390
await for (var output
392391
in _runBuilder(action.builder, inputs, phaseOutputIds)) {
393392
outputs.add(output);
394393
}
395-
}
394+
}));
396395

397396
/// Once the group is done, add all outputs so they can be used in the next
398397
/// phase.

0 commit comments

Comments
 (0)