Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Apr 9, 2020

Increase the default number of dart2js workers from 4 to 16. Make this number configurable.

@yjbanov yjbanov requested review from mdebbar and nturgut April 9, 2020 21:39
@auto-assign auto-assign bot requested a review from GaryQian April 9, 2020 21:41
// from ~4min to ~1.5min.
String maxWorkersPerTask = io.Platform.environment.containsKey('BUILD_MAX_WORKERS_PER_TASK')
? io.Platform.environment['BUILD_MAX_WORKERS_PER_TASK']
: '16';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on every platform we use? Otherwise we should add platform checks and warnings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question here is whether 16 is a good default. Not all machines have 16 cores.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points. I changed it so that if there's no environment variable defined, we don't pass anything at all (so it works like before). If we find that something other than 4 is a better default, we can change it at that time.

If you are a Google employee, you can use an internal instance of Goma to parallelize your builds. Because Goma compiles code on remote servers, this option is effective even on low-powered laptops.

By default, when compiling Dart code to JavaScript, we use 16 `dart2js` workers.
If you need to increase or reduce the number of workers, set the `BUILD_MAX_WORKERS_PER_TASK`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this different from -j? If so, it would be nice if you clarify the difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified.

// from ~4min to ~1.5min.
String maxWorkersPerTask = io.Platform.environment.containsKey('BUILD_MAX_WORKERS_PER_TASK')
? io.Platform.environment['BUILD_MAX_WORKERS_PER_TASK']
: '16';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question here is whether 16 is a good default. Not all machines have 16 cores.

@yjbanov yjbanov force-pushed the use-more-workers branch from 795e05c to e1fd793 Compare May 5, 2020 04:07
@yjbanov yjbanov requested review from mdebbar and nturgut May 5, 2020 04:07
@yjbanov
Copy link
Contributor Author

yjbanov commented May 8, 2020

Landing on red "Mac Web Engine". That one is a know flake.

@yjbanov yjbanov merged commit 7035255 into flutter:master May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 8, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 9, 2020
GaryQian pushed a commit to flutter/flutter that referenced this pull request May 11, 2020
* 9ea2db5 Add FlMessageCodec, FlBinaryCodec, FlStringCodec (flutter/engine#18186)

* f422757 Roll src/fuchsia/sdk/linux from MhpFP... to c1q_S... (flutter/engine#18222)

* 2ab918c Roll src/third_party/skia a14084ba1b41..8f6c3ed7c7be (1 commits) (flutter/engine#18223)

* 40167b6 Make robolectric tests run against SDK 29 by default (flutter/engine#17996)

* e5b0db6 Roll src/third_party/skia 8f6c3ed7c7be..b55372444d1b (4 commits) (flutter/engine#18224)

* ed08c3e Roll src/fuchsia/sdk/mac from 4MCVP... to T5tT0... (flutter/engine#18228)

* 6767517 Roll src/third_party/skia b55372444d1b..ac09f7cd7a28 (2 commits) (flutter/engine#18229)

* 983de2c Remove pipeline in favor of layer tree holder (flutter/engine#17688)

* a1218dd Roll src/third_party/skia ac09f7cd7a28..c683912173bb (2 commits) (flutter/engine#18230)

* 68bf137 skip painting clipped out pictures (flutter/engine#18204)

* 7035255 make compiler worker count configurable (flutter/engine#17616)

* c8ff03c Publish validation layer deps as part of the fuchsia artifacts (flutter/engine#18214)

* 576f0e1 Roll src/third_party/skia c683912173bb..7359165e660c (1 commits) (flutter/engine#18234)

* 1b3b4ec skip font loading tests for safari (flutter/engine#18232)

* 9319d7c Roll src/third_party/skia 7359165e660c..6913d1bb1d7a (1 commits) (flutter/engine#18237)

* 1b56f35 Roll src/third_party/dart 617bc54b715d..2a14a62112e6 (30 commits) (flutter/engine#18239)

* ff6942f Add fontFeatures and decorationThickness to textstyle (flutter/engine#18235)

* 4418ce8 Revert "Remove pipeline in favor of layer tree holder (#17688)" (flutter/engine#18242)

* 9d8daf2 Roll src/third_party/skia 6913d1bb1d7a..bf1904fd4898 (3 commits) (flutter/engine#18243)

* Updated bin/internal/fuchsia-linux.version

* Updated bin/internal/fuchsia-mac.version
wandyers pushed a commit to wandyers/engine that referenced this pull request May 23, 2020
* make compiler worker count configurable
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants