Repository navigation
Commit ca80599
authored
fix(project): batch Git ignore checks per directory level (#60)
Preparing provider exclusions asked Git once per parent directory: one
`git check-ignore` for its children, plus one `git ls-files` for each
ignored child. On Kubernetes that is about 2,200 serial Git processes and
29 s before gopls receives its first workspace generation
(1lck/Lithe-IDEA#1994).
Prefetch the same answers a directory level at a time: one `check-ignore`
per level and repository, and one batched `ls-files` (the new
`lithe_git::tracked_directories`) for the ignored children. Walks still
record decisions per parent through `prepare_parent`, which takes them
from the prefetch only when every candidate was answered there and
otherwise asks Git as before, so the excluded roots that providers and the
indexing status see do not change. Provider preparation, snapshots and
search index builds prefetch with their own visibility rules; releasing
the last lease frees the prefetched answers along with the decisions.
Kubernetes: 29.2 s and 2,179 Git processes before, 3.1 s and 14 after,
with identical file lists. The Lithe-IDEA checkout keeps the same seven
excluded roots with 9 Git processes instead of 59.1 parent 5802c42 commit ca80599
4 files changed
Lines changed: 475 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
305 | 354 | | |
306 | 355 | | |
307 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
0 commit comments