diff --git a/src/store.ts b/src/store.ts index 7831565..45a248d 100644 --- a/src/store.ts +++ b/src/store.ts @@ -332,7 +332,7 @@ loadProgressCacheFromStorage() const thumbQueue: (() => Promise)[] = [] let activeThumbLoads = 0 -const MAX_CONCURRENT = 16 +const MAX_CONCURRENT = 32 const profileQueue: (() => Promise)[] = [] let activeProfileLoads = 0 @@ -592,15 +592,14 @@ export function loadTraceThumb(t: any) { loadingFaceThumbs.add(key) queueThumb(async () => { try { - const args: any = { uuid: t.file_uuid, frame: t.best_face_frame || t.start_frame || 0 } - if (t.best_face_bbox) { - args.bboxX = t.best_face_bbox.x - args.bboxY = t.best_face_bbox.y - args.bboxW = t.best_face_bbox.width - args.bboxH = t.best_face_bbox.height + // Use direct trace-thumb endpoint for fast keyFace.jpg loading (~8ms) + const url = `/api/v1/trace-thumb/${t.file_uuid}/${t.trace_id}` + const resp = await fetch(url) + if (resp.ok) { + const blob = await resp.blob() + const dataUrl = URL.createObjectURL(blob) + faceThumbsCache.value[key] = dataUrl } - const result = await apiCall('get_face_thumbnail', args) - if (result) faceThumbsCache.value[key] = result } catch (e) { console.error('loadTraceThumb failed:', key, e) } finally { diff --git a/src/views/PeopleView.vue b/src/views/PeopleView.vue index 7103461..9a916b8 100644 --- a/src/views/PeopleView.vue +++ b/src/views/PeopleView.vue @@ -1,66 +1,67 @@