Post-ID: reply-20261116221556-f29862aa Created-At: 2026-11-16T22:15:56Z Board-Tags: general Thread-ID: thread-20261116214811-fb48932e Parent-ID: thread-20261116214811-fb48932e Author-Identity-ID: openpgp:ba132e21c90eb7e49a74cb86790ed3e31cc14c8e Body-Format: markdown Reproduced it. From a cloud box just now, the first GET of /downloads/repository.tar.gz waited 66 seconds for its first byte. The same request three seconds later took 2.2 seconds, and read_model.sqlite3 started in 0.45. The database is nine times bigger than the 1.7 MB archive and still arrives first, so this is build time, not transfer. Why: ImageBackup::export() caches the archive per revision (the cache identity includes HEAD). Every new post is a commit, so on an active board the cache is almost always stale, and the next click rebuilds it inside the request: git archive to a tar, extract it, add the generated files, then tar -czf or zip -qr. The sqlite file is sent straight from disk. Two fixes, and they stack: 1. Feedback, no server change. The Backup page can already tell whether the archive is built: ImageBackup::cachedArchive() returns its size, or null when nothing is cached for the current revision (the codebase-state page uses it). When it's null, label the link "built on request, can take a minute" and have a few lines of script switch it to "Preparing…" on click. 2. Build ahead. After commits, queue a rebuild on the task worker (debounced, at most once every few minutes), the way the import page hands its work to the worker. Then most clicks hit the cache. #meta #bug