perf: race furniture asset download candidates instead of trying sequentially
CI / check (push) Successful in 47s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m7s

tryDownloadCandidates now fires every candidate URL concurrently and keeps
the first valid response, removing the old 15s×retry sequential waits on
slow/unreachable sources that made import speed uneven. Batch concurrency
raised 8 -> 12 to absorb the now-faster downloads.
This commit is contained in:
openhands committed 2026-08-22 13:38:00 +02:00
1 parent ac7c427c3d
commit 1d8672ccc5
2 files changed
+32 -7

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ import type { ImportSingleResult } from "@/types/furni";
// How many items to import concurrently in a batch. The per-item work is
// network-bound (asset downloads) and DB-bound, so a modest pool gives a large
// speedup over the old fully sequential loop without overwhelming the DB.
const IMPORT_BATCH_CONCURRENCY = 8;
const IMPORT_BATCH_CONCURRENCY = 12;
async function runWithConcurrency<T, R>(
items: T[],