Repository navigation
Commit d92786e
perf(remote): index displayed ref names once per fetch
With `--prefetch`, Git writes destinations under `refs/prefetch/`.
Those paths do not match the configured tracking refspec, so parsing
each result used to scan and format the whole local ref inventory.
Index the inventory by displayed name once and reuse the matching
bucket for each result. Preserve every full path in each bucket so the
decoder can still handle display-name collisions.
The scripted prefetch regression detected repeated formatting before
the change and passes on both backend selections. A local CLI prefetch
of 4,001 unchanged branches took a median of 0.47 seconds over five
runs, down from 4.77 seconds before indexing. Ruff and mypy passed.
Agent-Model: unknown1 parent 507448f commit d92786e
3 files changed
Lines changed: 33 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
374 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
| |||
425 | 432 | | |
426 | 433 | | |
427 | 434 | | |
| 435 | + | |
428 | 436 | | |
429 | | - | |
| 437 | + | |
430 | 438 | | |
431 | | - | |
| 439 | + | |
432 | 440 | | |
433 | 441 | | |
434 | 442 | | |
| |||
839 | 847 | | |
840 | 848 | | |
841 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
842 | 853 | | |
843 | 854 | | |
844 | 855 | | |
845 | 856 | | |
846 | 857 | | |
847 | 858 | | |
848 | 859 | | |
849 | | - | |
| 860 | + | |
850 | 861 | | |
851 | 862 | | |
852 | 863 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
0 commit comments