Title: Production build peak memory +53% after upgrading @angular/build 21.2.13 → 22.0.0 (same code, same esbuild version) · Issue #33368 · angular/angular-cli · GitHub
Open Graph Title: Production build peak memory +53% after upgrading @angular/build 21.2.13 → 22.0.0 (same code, same esbuild version) · Issue #33368 · angular/angular-cli
X Title: Production build peak memory +53% after upgrading @angular/build 21.2.13 → 22.0.0 (same code, same esbuild version) · Issue #33368 · angular/angular-cli
Description: Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was @angular/build 21.2.13 / Angular 21.2.15 / TS 5.9.3 Description After upgrading to Ang...
Open Graph Description: Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was @angular/build 21.2.13 / Angular 21.2.15 / TS ...
X Description: Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was @angular/build 21.2.13 / Angular 21.2.15 / TS ...
Opengraph URL: https://github.com/angular/angular-cli/issues/33368
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Production build peak memory +53% after upgrading @angular/build 21.2.13 → 22.0.0 (same code, same esbuild version)","articleBody":"### Command\n\nbuild\n\n### Is this a regression?\n\n- [x] Yes, this behavior used to work in the previous version\n\n### The previous version in which this bug was not present was\n\n@angular/build 21.2.13 / Angular 21.2.15 / TS 5.9.3\n\n### Description\n\nAfter upgrading to Angular 22, our production build's peak memory rose from ~15.5GB to ~23.8GB (+53%), which started OOM-killing our 16GB CI runners. A/B measurement on the identical commit of a large Nx monorepo (~7,400 TS\n files, ~2,250 components, single application target), cold build cache, default workers, sampling combined RSS of the full node + esbuild process tree every 3s:\n Toolchain │ Peak RSS │\n @angular/build 21.2.13, Angular 21.2.15, TS 5.9.3 │ 15.5GB │\n @angular/build 22.0.0, Angular 22.0.0, TS 6.0.3 │ 23.8GB │\n @angular/build 22.0.1, Angular 22.0.0, TS 6.0.3 │ 22.3GB │\n \n - esbuild is 0.28.0 in both setups (unchanged).\n - The application code is identical in both runs (the v21 build needed only ignoreDeprecations adjusted in tsconfig).\n - 22.0.1's stylesheet-bundler leak fixes (#33318) recover ~1.5GB but the bulk of the increase remains.\n - NG_BUILD_MAX_WORKERS=2 makes peak memory worse (31.8GB), not better.\n - Caveat: TypeScript necessarily moved 5.9.3 → 6.0.3 with the Angular major, so we cannot separate the TS 6 share of the increase from @angular/build 22 itself.\n - Symptom on constrained machines: host OOM killer fires (or esbuild dies with fatal error: all goroutines are asleep - deadlock! when Node's --max-old-space-size exceeds physical RAM).\n\n\n### Minimal Reproduction\n\n Private repo, so I can't share a reproduction, but happy to run instrumented builds / --stats-json / heap profiles on request.\n\n\n### Exception or Error\n\n```text\n\n```\n\n### Your Environment\n\n```text\nNode 24.16.0, npm 11.x, macOS 27 (arm64) + Linux CI, Nx 21.3.2\n```\n\n### Anything else relevant?\n\n_No response_","author":{"url":"https://github.com/t-barak","@type":"Person","name":"t-barak"},"datePublished":"2026-06-12T13:43:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/33368/angular-cli/issues/33368"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:01317779-a1cc-3320-9b47-baf7d9dad0af |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB44:70AED:268F62:339EC8:6A628568 |
| html-safe-nonce | 6fbbfccb79ed99977de44fbf96b8616d15b14f37bfe035511842f24fa8a86a28 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjQ0OjcwQUVEOjI2OEY2MjozMzlFQzg6NkE2Mjg1NjgiLCJ2aXNpdG9yX2lkIjoiNDQwOTczODc4ODI1ODA4ODI5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da62514beb0f8ce6b6e6305475311a9efbce55fa8426ee40895aa248f158feed |
| hovercard-subject-tag | issue:4649717324 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/33368/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b7bff43a003cab162c2790d0591ade63cb56d873afb4bd787ecc0bbe68c0b83/angular/angular-cli/issues/33368 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b7bff43a003cab162c2790d0591ade63cb56d873afb4bd787ecc0bbe68c0b83/angular/angular-cli/issues/33368 |
| og:image:alt | Command build Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was @angular/build 21.2.13 / Angular 21.2.15 / TS ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | t-barak |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7a4ef49a11a2c05de16a801b29c54a151d2e3262d6fd17381ca13b5ae25dda8f |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 97b18c8f1d2683a31995fd6e802daf9bf0d4d3f0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width