Files
lazygit/pkg
Stefan HallerandClaude Opus 5.5 e64b209aed Speed up drawing a view with many search matches
If a search has many matches, scrolling the view becomes laggy. For
example, a search for "e" in a long branch log can find 44000 matches.
With that many, drawing a 100x40 view takes 40ms, where it takes 0.14ms
without a search.

For every cell it draws, draw looks through all the matches to see if
the cell is part of one.

The matches are sorted in the same order as draw visits the cells, so
let draw step through them along with the cells. It finds the first
match on screen with a binary search. Drawing that view now takes
0.14ms with or without a search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:28:00 +01:00
..
2025-05-06 09:43:26 +02:00
2026-07-31 08:42:51 +02:00
2025-11-15 10:46:23 +01:00