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
{{ message }}
Repository navigation
[Sad Catapella B7][Performance] IntensityPanel recomputes image pooling and distribution curves for every setting or channel change #97
Sad Catapella Batch 7, preprocessing maind7a538e56d41ac1093ba79adcad397c21b3dfd32. Confirmed repeated-work structure; latency/RSS unmeasured. This is distinct from normalization's leave-one-out algorithm cost (filed in its owning repository).
_draw() lines 2811–2822 invokes repeat_distributions on every threshold or channel change, rebuilding every repeat's PooledHistogram and its large histogram arrays, even though underlying records and cumulative distributions do not change with thresholds.
IntensityPanel.show() can initialize the necessary cache for a specific table. Current notebook tests exercise rendering/updated settings but do not measure repeated calls or scaling.
Fix / acceptance
Split (a) immutable image summaries and per-channel pooled repeat distributions from (b) threshold-dependent warnings and (c) plot rendering. Cache summaries and the precomputed CDFs for the current table, invalidate only when show(records) or clear() changes data, not when outlier limit/saturation threshold/min_images changes; invalidate per channel only when needed. Avoid repeated full PNG redraw if only status/warning annotations change, where feasible. Do not cache by fragile id(records) across replacement; use explicit lifecycle. Compare exact warning flags/curves before/after threshold edits, channel switching, and replaced tables. Benchmark initial render and 10 settings/channel changes on 10²–10⁴ images, 1–8 channels, 256–65536 bins, measuring wall time and peak RSS; use no Numba in UI. No tests executed; no code changed.
Activity