Photos grid was fetching per_page=500 on the very first request, which serialized hundreds of thumbnail requests behind a single sort+payload. Split into PER_PAGE_INITIAL=100 (one viewport, fast paint) and PER_PAGE_BACKGROUND=500 (subsequent prefetch pages, fewer round-trips). Idle polling for scan-status and worker-status was set to 10s / 15s respectively. With nothing queued the typical session was firing 4–6 status requests every minute through the single uvicorn event loop on top of everything else. Bumped both to 30s. While actively scanning / processing the 2s / 3s cadence is unchanged — that's where the user actually wants live updates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.5 KiB
3.5 KiB