perf(build): raise hike image-encode concurrency cap to 10

Allow up to 10 parallel image pipelines (was 4) on hosts with the cores to spare.
This commit is contained in:
2026-05-25 14:51:55 +02:00
parent 59b4630746
commit 316a340494
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ const VALID_DIFFICULTIES: readonly Difficulty[] = ['T1', 'T2', 'T3', 'T4', 'T5',
// Sharp pipelines are CPU-heavy but release the JS thread while libvips runs,
// so a small concurrency pool gives a near-linear speed-up. Cap at 4 to avoid
// thrashing on smaller boxes (a single AVIF encode can saturate one core).
const IMAGE_CONCURRENCY = Math.max(2, Math.min(os.cpus().length, 4));
const IMAGE_CONCURRENCY = Math.max(2, Math.min(os.cpus().length, 10));
async function pathExists(p: string): Promise<boolean> {
try {