| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b198044 commit 3d08e5b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -540,8 +540,12 @@ export class I18nInliner { | |||
| 540 | 540 | // at least one worker to process smaller chunks in parallel without starvation. | |
| 541 | 541 | const targetWorkers = Math.max(1, Math.min(workerCount - 1, MAX_DOMINANT_WORKERS)); | |
| 542 | 542 | localesPerBatch = Math.max(1, Math.ceil(entries.length / targetWorkers)); | |
| 543 | + } else if (uncachedByFile.size >= workerCount) { | ||
| 544 | + // Worker pool is already saturated by file-level concurrency; | ||
| 545 | + // process all locales in a single batch to avoid duplicate parsing and IPC overhead. | ||
| 546 | + localesPerBatch = entries.length; | ||
| 543 | 547 | } else { | |
| 544 | - // Intermediate files: moderate sharding | ||
| 548 | + // Intermediate files with idle workers: moderate sharding | ||
| 545 | 549 | localesPerBatch = Math.max(1, Math.ceil(entries.length / 2)); | |
| 546 | 550 | } | |
| 547 | 551 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments