Repository navigation
Commit 9a2b4a0
committed
perf(@angular/build): avoid sharding intermediate files under worker surplus in i18n inliner
When the number of uncached files in an inlining window meets or exceeds
the worker pool concurrency, the thread pool already has sufficient
file-level parallelism to keep all workers fully utilized.
Previously, all intermediate files (files between 100 KB and 70% of the
maximum file size) were sharded into batches of half their locales
regardless of the total file count. In applications with many chunks,
this doubled the number of worker tasks and forced multiple worker threads
to independently parse the same JavaScript file and decode the same source
map.
Intermediate files are now processed with all window locales in a single
batch whenever the file count is greater than or equal to the worker thread
count. This halves the task count for intermediate chunks, eliminates
redundant AST and sourcemap parsing across threads, and reduces IPC and
scheduling overhead.1 parent 8c273b0 commit 9a2b4a0
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
543 | 547 | | |
544 | | - | |
| 548 | + | |
545 | 549 | | |
546 | 550 | | |
547 | 551 | | |
| |||
0 commit comments