mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 14:06:32 -04:00
A view's search positions were worked out again from every write, and each of those walks the whole view. Content arrives a line at a time, so rendering into a searched view costs a walk per line. Streaming 2000 lines takes 565ms, where the same render into an unsearched view takes about 10ms. Mark the positions stale on a write instead, and work them out where they are read: when the view is drawn, when a key steps through the matches, when the status is asked for. That is at most once a frame, and the same 2000 lines now take 8ms. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>