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)