diff --git a/docs/dev/benchmarks.md b/docs/dev/benchmarks.md index a14a2af..203afee 100644 --- a/docs/dev/benchmarks.md +++ b/docs/dev/benchmarks.md @@ -58,8 +58,13 @@ Two of those rows carry a qualifier, and the qualifiers are the point. **NFR-P1 — catalog open under 2 s.** The measured span is the four things the library view cannot paint without: `Catalog::open` (which connects, migrates and -**backfills**, and the backfill is three passes over the images table on every -open), `count`, the first 400-row `window`, and the monthly `timeline`. Tagged +**backfills**, and the backfill is passes over the whole images table), `count`, +the first 400-row `window`, and the monthly `timeline`. Since 0.17.0 the +backfill runs on the first open of a catalog in a process and is skipped by +later ones while nothing has changed ([catalog.md §2](catalog.md)), so +`catalog_open_ms` includes it and `catalog_open_warm_ms`, the second open in +the same process, does not — which is what a library reopened in the same +session costs. Tagged `TRACES: NFR-P1` in [`tools/bench/src/catalog_open.rs`](../../tools/bench/src/catalog_open.rs), because a build that breaks it fails this gate. diff --git a/tools/bench/src/catalog_open.rs b/tools/bench/src/catalog_open.rs index 791cc53..f84c40d 100644 --- a/tools/bench/src/catalog_open.rs +++ b/tools/bench/src/catalog_open.rs @@ -14,9 +14,9 @@ //! without: //! //! 1. [`Catalog::open`] — connect, migrate if needed, and **backfill**. The -//! backfill is the interesting one: `schema::backfill` runs on every open -//! and is three passes over the images table, so it is O(library) work on a -//! path whose budget is stated in absolute seconds. +//! backfill is the interesting one: O(library) passes over the images table +//! on a path whose budget is in absolute seconds. Since 0.17.0 it runs on the +//! first open in a process and is skipped while nothing changed (`backfilled`). //! 2. [`Catalog::count`] — the total, which is what sizes the scrollbar. //! 3. [`Catalog::window`] — the first screenful of rows. //! 4. [`Catalog::timeline`] — the scrubber's buckets, drawn beside the grid