perf: race furniture asset download candidates instead of trying sequentially
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:
1 parent
ac7c427c3d
commit
1d8672ccc5
2 files changed
+32
-7
No files matched your search
@@ -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[],
|
||||
|
||||
Reference in new issue
Block a user