Repository navigation
Commit 2afc7f5
committed
perf(@angular/build): bound aggregate worker allocation across dominant files in i18n inliner
Previously, MAX_DOMINANT_WORKERS (4) was applied independently per dominant
file. When multiple large bundles qualified as dominant in the same window
(e.g., 3 bundles of 3 MB each), each bundle claimed up to 4 worker threads,
allocating up to 12 heavy tasks simultaneously. This could saturate the
entire worker pool with large AST and sourcemap remappings, starving
smaller chunks and spiking peak RSS.
The target worker count per dominant file now divides MAX_DOMINANT_WORKERS
by the number of dominant files in the window. This preserves the existing
4-worker allocation when a single dominant file is present, while bounding
aggregate dominant concurrency across the pool when multiple large bundles
exist.1 parent 9a2b4a0 commit 2afc7f5
1 file changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
523 | 537 | | |
524 | 538 | | |
525 | 539 | | |
| |||
535 | 549 | | |
536 | 550 | | |
537 | 551 | | |
538 | | - | |
| 552 | + | |
539 | 553 | | |
540 | 554 | | |
541 | | - | |
542 | | - | |
| 555 | + | |
543 | 556 | | |
544 | 557 | | |
545 | 558 | | |
| |||
0 commit comments