Skip to content

Commit

Permalink
Partially revert "πŸ— Parallelize dist steps (#35943)" (#36176)
Browse files Browse the repository at this point in the history
* Revert "πŸ— Parallelize `dist` steps (#35943)"

This reverts commit 1e2c808.

* Partially allow parallelization for smaller tasks

* Also include `compileAllJs` in the parallelized part
  • Loading branch information
danielrozenberg committed Sep 27, 2021
1 parent 1682265 commit 73483ef
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions build-system/tasks/dist.js
Expand Up @@ -114,19 +114,20 @@ async function dist() {
await runPreDistSteps(options);

// These steps use closure compiler. Small ones before large (parallel) ones.
const steps = [];
if (argv.core_runtime_only) {
steps.push(compileCoreRuntime(options));
await compileCoreRuntime(options);
} else {
steps.push(buildExperiments());
steps.push(buildLoginDone('0.1'));
steps.push(buildWebPushPublisherFiles());
steps.push(buildCompiler());
steps.push(compileAllJs(options));
await Promise.all([
buildExperiments(),
buildLoginDone('0.1'),
buildWebPushPublisherFiles(),
buildCompiler(),
compileAllJs(options),
]);
}

// This step internally parses the various extension* flags.
steps.push(buildExtensions(options));
await buildExtensions(options);

// This step is to be run only during a full `amp dist`.
if (
Expand All @@ -135,11 +136,9 @@ async function dist() {
!argv.extensions_from &&
!argv.noextensions
) {
steps.push(buildVendorConfigs(options));
await buildVendorConfigs(options);
}

await Promise.all(steps);

// This step is required no matter which binaries are built.
await formatExtractedMessages();

Expand Down

0 comments on commit 73483ef

Please sign in to comment.