From 7217518cfddbed3ebdb8672edc3f797aa568b385 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sat, 19 Sep 2026 12:25:22 -0400 Subject: [PATCH] Write down what auto-pause actually does It reads like a paint optimisation and is not: pausing deletes the view, so becoming visible again is a full rebuild. dataflow embeds the same viewer and would hit the same stall, so it belongs in the shared reference next to the other things that cost us a day to find. Co-Authored-By: Claude Opus 5 (1M context) --- PERSPECTIVE.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/PERSPECTIVE.md b/PERSPECTIVE.md index da40019..a5678eb 100644 --- a/PERSPECTIVE.md +++ b/PERSPECTIVE.md @@ -268,6 +268,32 @@ it would retire the `if(...)`-expression workaround. It costs the d3fc charts, t column; both need validating, and the entry should be dropped rather than the layout. Add this guard as part of adopting §3a, not after. +### Auto-pause deletes the view — turn it off for a static pivot + +`` auto-pauses by default: an `IntersectionObserver` on itself +(scrolled out of the viewport, `display: none`) combined with the document's +`visibilitychange` (backgrounded tab, minimized window). "Pause" is not a paint +optimisation — `session.set_pause(true)` runs `view_sub.take().delete()`, so the +**view object is destroyed**. Becoming visible again calls +`restore_and_render(…, ViewerConfigUpdate::default())`: a new view and a full +traversal, every time. + +For a viewer streaming live updates nobody is watching, that is the right trade. +For a pivot over a large static table it is the wrong one — on pf_app's +`fc_osm_skinny_29` grain it is a multi-second stall on every tab switch, and it +silently discards per-node expand/collapse (§"Not fixed by any of this"), which +has no config representation and so cannot be restored. + +```js +await viewer.load(table) +try { if (viewer.setAutoPause) await viewer.setAutoPause(false) } catch {} +``` + +Guard the call: it is a method on the custom element and absent on older builds. +Leave auto-pause **on** where the table is fed by a live stream the user does not +need to have kept up with while away. This is long-standing viewer behaviour, not +a 5.x regression — worth knowing before blaming a rebuild on your own code. + --- ## 6. Build & deploy (target)