Skip to content

perf(bazel): reduce input files for ng_package rollup and type bundle actions#46187

Closed
devversion wants to merge 1 commit intoangular:mainfrom
devversion:speed-up-ng-package-actions
Closed

perf(bazel): reduce input files for ng_package rollup and type bundle actions#46187
devversion wants to merge 1 commit intoangular:mainfrom
devversion:speed-up-ng-package-actions

Conversation

@devversion
Copy link
Member

@devversion devversion commented May 30, 2022

\We currently use all the ESM2020 and type sources as inputs for rollup
and type bundle actions, respectively. This is a source of slowness in
Bazel sandboxed builds because many unused files will be linked/made
available for many concurrently-running actions.

We should limit the inputs only to what is assumed to be used. We cannot
know exactly and need to include transitive types from node_modules,
but that is an inevitable construct with the current Bazel rules.

Note that the external node modules could still bring in a lot of files,
like in Material where the .d.ts files for all locales are brought
into the sandbox (from @angular/common). We likely would need to
remove these files in a postinstall for now, to speed up actions,
similar to how we did it for RxJS in all repositories. These are known
to be not used in the components repo.

I saw an decrease by 50% of inputs average in the COMP repo. That should
hopefully help a lot with speed. Still many inputs are the locales from the common
package (and some package.json files which end up being part of DeclarationInfo)

cc. @mmalerba

…le actions

We currently use all the ESM2020 and type sources as inputs for rollup
and type bundle actions, respectively. This is a source of slowness in
Bazel sandboxed builds because many unused files will be linked/made
available for many concurrently-running actions.

We should limit the inputs only to what is assumed to be used. We cannot
know exactly and need to include transitive types from `node_modules`,
but that is an inevitable construct with the current Bazel rules.

Note that the external node modules could still bring in a lot of files,
like in Material where the `.d.ts` files for all locales are brought
into the sandbox (from `@angular/common`). We likely would need to
remove these files in a postinstall for now, to speed up actions,
similar to how we did it for RxJS in all repositories. These are known
to be not used in the components repo.
devversion added a commit to devversion/material2 that referenced this pull request May 30, 2022
…files

Removing the locale files will help us reduce Bazel action inputs and
therefore speed up compilations/type bundling because the bazel sandbox
would not need as much files to be sandboxed/symlinked.

More info can be found here: angular/angular#46187
@devversion devversion marked this pull request as ready for review May 30, 2022 14:00
@devversion devversion added action: review The PR is still awaiting reviews from at least one requested reviewer area: bazel Issues related to the published `@angular/bazel` build rules labels May 30, 2022
@ngbot ngbot bot modified the milestone: Backlog May 30, 2022
@devversion devversion added the target: rc This PR is targeted for the next release-candidate label May 30, 2022
devversion added a commit to angular/components that referenced this pull request May 30, 2022
…files (#24995)

Removing the locale files will help us reduce Bazel action inputs and
therefore speed up compilations/type bundling because the bazel sandbox
would not need as much files to be sandboxed/symlinked.

More info can be found here: angular/angular#46187

(cherry picked from commit 988faa6)
devversion added a commit to angular/components that referenced this pull request May 30, 2022
…files (#24995)

Removing the locale files will help us reduce Bazel action inputs and
therefore speed up compilations/type bundling because the bazel sandbox
would not need as much files to be sandboxed/symlinked.

More info can be found here: angular/angular#46187
@devversion devversion requested a review from josephperrott May 31, 2022 18:19
Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 31, 2022
@atscott atscott added state: blocked and removed action: merge The PR is ready for merge by the caretaker labels May 31, 2022
@atscott
Copy link
Contributor

atscott commented May 31, 2022

Removing merge label so this isn't accidentally merged during the code freeze. Blocked on the final v14 release on Thursday

@devversion devversion added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed state: blocked target: rc This PR is targeted for the next release-candidate labels Jun 2, 2022
@alxhub
Copy link
Member

alxhub commented Jun 2, 2022

This PR was merged into the repository by commit f74bd1b.

@alxhub alxhub closed this in f74bd1b Jun 2, 2022
alxhub pushed a commit that referenced this pull request Jun 2, 2022
…le actions (#46187)

We currently use all the ESM2020 and type sources as inputs for rollup
and type bundle actions, respectively. This is a source of slowness in
Bazel sandboxed builds because many unused files will be linked/made
available for many concurrently-running actions.

We should limit the inputs only to what is assumed to be used. We cannot
know exactly and need to include transitive types from `node_modules`,
but that is an inevitable construct with the current Bazel rules.

Note that the external node modules could still bring in a lot of files,
like in Material where the `.d.ts` files for all locales are brought
into the sandbox (from `@angular/common`). We likely would need to
remove these files in a postinstall for now, to speed up actions,
similar to how we did it for RxJS in all repositories. These are known
to be not used in the components repo.

PR Close #46187
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Jun 17, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/animations](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fanimations/14.0.0/14.0.1) |
| [@angular/common](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fcommon/14.0.0/14.0.1) |
| [@angular/compiler](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fcompiler/14.0.0/14.0.1) |
| [@angular/compiler-cli](https://github.com/angular/angular) | devDependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fcompiler-cli/14.0.0/14.0.1) |
| [@angular/core](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fcore/14.0.0/14.0.1) |
| [@angular/forms](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fforms/14.0.0/14.0.1) |
| [@angular/platform-browser](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fplatform-browser/14.0.0/14.0.1) |
| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | dependencies | patch | [`14.0.0` -> `14.0.1`](https://renovatebot.com/diffs/npm/@angular%2fplatform-browser-dynamic/14.0.0/14.0.1) |

---

### Release Notes

<details>
<summary>angular/angular</summary>

### [`v14.0.1`](https://github.com/angular/angular/blob/HEAD/CHANGELOG.md#&#8203;1401-2022-06-08)

[Compare Source](angular/angular@14.0.0...14.0.1)

##### bazel

| Commit | Type | Description |
| -- | -- | -- |
| [b00d237c0e](angular/angular@b00d237) | fix | update API extractor version ([#&#8203;46259](angular/angular#46259)) |
| [9a0a7bac21](angular/angular@9a0a7ba) | perf | reduce input files for `ng_package` rollup and type bundle actions ([#&#8203;46187](angular/angular#46187)) |

##### forms

| Commit | Type | Description |
| -- | -- | -- |
| [dde0b7f4b3](angular/angular@dde0b7f) | fix | allow FormBuilder.group(...) to accept optional fields. ([#&#8203;46253](angular/angular#46253)) |

#### Special Thanks

Adrien Crivelli, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Dylan Hunn, Fabrizio Fallico, George Kalpakas, Jelle Bruisten, JoostK, Kristiyan Kostadinov, Krzysztof Platis, Paul Gschwendtner, Phalgun Vaddepalli, San Leen, dario-piotrowicz, mgechev and wellWINeo

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1404
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: bazel Issues related to the published `@angular/bazel` build rules target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants