-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Improve CPU usage when building wasm_release #37294
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
lib/web_ui/dev/build.dart
Outdated
'autoninja', | ||
// When build the wasm target that includes CanvasKit, we need to use | ||
// `ninja` directly to avoid having a high `-j` value that could | ||
// potentially slow down the entire machine because emscripten doesn't use | ||
// goma. | ||
host ? 'autoninja' : 'ninja', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'autoninja',
if (!host)
'--offline',
may do the trick? That instructs autoninja to not look for goma, so it'll default to whatever J it deems good for local builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--offline
did the trick!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, maybe the right thing is to actually edit //flutter/tools/gn
. It has a bunch of stuff to try to determine whether to use goma in there, and maybe we should just short circuit that if we're doing a wasm build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on my machine!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
test-exempt: configuration change |
…114667) * 49acbfb08 Make iOS PlatformView to reuse VisualEffectView when possible. (flutter/engine#37263) * 48f31a539 Roll Skia from 8e48bb8ea52e to 10acfb0efbc9 (2 revisions) (flutter/engine#37300) * af61d4092 [Impeller] Add non-rrect polygon to shadow test (flutter/engine#37296) * 97fb982f3 [web] Improve CPU usage when building wasm_release (flutter/engine#37294) * ca0755adc Roll Skia from 10acfb0efbc9 to b8209dce9a48 (1 revision) (flutter/engine#37303) * 44398ccf5 Make hot reload work (flutter/engine#37304) * 69a275300 Roll Fuchsia Mac SDK from mOXbRSWGSdWRXIefR... to JKfnEvEVIL_Cg3_9f... (flutter/engine#37305)
* [web] Improve CPU usage when building wasm_release * use --offline mode * make the change in tools/gn instead
…lutter#114667) * 49acbfb08 Make iOS PlatformView to reuse VisualEffectView when possible. (flutter/engine#37263) * 48f31a539 Roll Skia from 8e48bb8ea52e to 10acfb0efbc9 (2 revisions) (flutter/engine#37300) * af61d4092 [Impeller] Add non-rrect polygon to shadow test (flutter/engine#37296) * 97fb982f3 [web] Improve CPU usage when building wasm_release (flutter/engine#37294) * ca0755adc Roll Skia from 10acfb0efbc9 to b8209dce9a48 (1 revision) (flutter/engine#37303) * 44398ccf5 Make hot reload work (flutter/engine#37304) * 69a275300 Roll Fuchsia Mac SDK from mOXbRSWGSdWRXIefR... to JKfnEvEVIL_Cg3_9f... (flutter/engine#37305)
Doing a
felt build
(without--host
) causes high cpu usage for some people (including me and @htoor3). This is because our build tries to usegoma
with a high parallelization factor that all ends up happening in the local machine becausegoma
doesn't supportemscripten
yet.This PR disables
goma
for wasm/web builds.