You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scoped out of #219. Documented in EXPLORER_STATE.md §6 table v2 viewport-coupling paragraph.
Bug
The two surfaces that report sample counts in the current viewport use different cache strategies:
Phase-msg "Samples in View" / #sSamples stat box: written by loadViewportSamples() in zoomWatcher. Reuses cachedTotalCount from the previous query whenever the new viewport is within the previously-fetched padded bounds (isWithinCache(bounds) short-circuit). Designed to make panning feel smooth.
Result: on cache-hit pans the table refetches and gets a slightly different total than what the phase-msg shows from its earlier fetch. E.g. table=147, phase-msg=153 from the prior fetch.
Primary #219 bug (table=6M while phase-msg=153 at the same viewport) is fully resolved; this is a smaller residual divergence.
Options
Make the table reuse the point-mode cache. When loadViewportSamples() short-circuits on a cache hit, signal the table to also short-circuit (don't refetch; trust the previous totals). Couples tableView to a zoomWatcher internal.
Make point-mode always refetch the count. Drop the cache-hit short-circuit for cachedTotalCount so each moveEnd refetches. Slight perf regression on rapid panning.
Make both share a single bbox-snapshot + count cache. Cleanest architecturally; more refactor.
How to reproduce
Zoom into point mode somewhere with >5K samples (e.g. Cyprus / Polis). Pan a small amount (within ~30% of the original bbox). Compare table row total to phase-msg "samples in view" — they should differ slightly.
References
Cache short-circuit: loadViewportSamples()isWithinCache(bounds) branch in zoomWatcher
Scoped out of #219. Documented in
EXPLORER_STATE.md§6 table v2 viewport-coupling paragraph.Bug
The two surfaces that report sample counts in the current viewport use different cache strategies:
#sSamplesstat box: written byloadViewportSamples()inzoomWatcher. ReusescachedTotalCountfrom the previous query whenever the new viewport is within the previously-fetched padded bounds (isWithinCache(bounds)short-circuit). Designed to make panning feel smooth.viewer.camera.moveEnd. Always reflects the current 30%-padded viewport bbox.Result: on cache-hit pans the table refetches and gets a slightly different total than what the phase-msg shows from its earlier fetch. E.g. table=147, phase-msg=153 from the prior fetch.
Primary #219 bug (table=6M while phase-msg=153 at the same viewport) is fully resolved; this is a smaller residual divergence.
Options
loadViewportSamples()short-circuits on a cache hit, signal the table to also short-circuit (don't refetch; trust the previous totals). Couples tableView to a zoomWatcher internal.cachedTotalCountso each moveEnd refetches. Slight perf regression on rapid panning.How to reproduce
Zoom into point mode somewhere with >5K samples (e.g. Cyprus / Polis). Pan a small amount (within ~30% of the original bbox). Compare table row total to phase-msg "samples in view" — they should differ slightly.
References
loadViewportSamples()isWithinCache(bounds)branch inzoomWatcherviewer.camera.moveEndlistener intableView(PR Samples table: scope to current viewport bbox #219)