mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 11:54:06 +00:00
A sheet whose filter hides a million rows walked every hidden row several times per frame (cells, gridlines, headers), rebuilt the row index, the outline and the used range every frame, and a conditional format over a whole column rescanned it every frame for its statistics. - LineIndex::next_visible / visible step over a run of hidden lines in one O(log n) search; the grid's row and column loops use them. - The grid keeps the active sheet's line index, outlines, used range and CfCache between frames, tied to the sheet by a Weak: any change goes through Arc::make_mut, which moves or copies a sheet that has a weak reference, so the cache can't outlive a change. - Scroll offsets for the scrollbars and the scroll limit come from the line index instead of walking every custom row. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>