Repository navigation
Commit d7a45fd
enhance: only visit visible links and dots when rendering the commit graph
`Views.CommitGraph.Render` iterated `Links` and `Dots` from the first item on every frame, skipping everything above
the viewport, which is O(commits) per frame when scrolled to the bottom of a long history. Both lists are ordered by Y
(one dot per commit row, each link ends half a row below its commit), so binary search the first visible item instead.
`Paths` keep the linear scan since a path that starts far above the viewport can still cross it.
The grayed pens are now created once in `Models.CommitGraph.SetPens` (and the dot fill pen is cached until `DotBrush`
changes) instead of being allocated on every frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCxH1zwDXLd9kfAAkcf6PZ1 parent 3e65576 commit d7a45fd
2 files changed
Lines changed: 39 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | | - | |
| 81 | + | |
76 | 82 | | |
77 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
78 | 86 | | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
168 | 177 | | |
169 | 178 | | |
170 | 179 | | |
171 | | - | |
172 | | - | |
| 180 | + | |
| 181 | + | |
173 | 182 | | |
174 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
175 | 186 | | |
| 187 | + | |
176 | 188 | | |
177 | 189 | | |
178 | 190 | | |
| |||
199 | 211 | | |
200 | 212 | | |
201 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
202 | 230 | | |
203 | 231 | | |
| 232 | + | |
204 | 233 | | |
205 | 234 | | |
0 commit comments