The packing algo in useCellList will execute ~4x each time we click a NoteAnchor due to various focus changes, container height changes, and cell position changes that all happen in various render cycles. Since there's a sort in there as well, performance isn't going to scale well.
Throttle the packing algo, or figure out some other way to reduce call count through some memoization magicks.
The packing algo in
useCellListwill execute ~4x each time we click aNoteAnchordue to various focus changes, container height changes, and cell position changes that all happen in various render cycles. Since there's a sort in there as well, performance isn't going to scale well.Throttle the packing algo, or figure out some other way to reduce call count through some memoization magicks.