5 repos · 33 commands · 2 broken · 7 slow · 5 filed
Played a large-monorepo engineer on Windows: a 200k-file synthetic repo (with 4 x 40 MB and a 768 MB binary), git/git (82.8k commits) with 61k refs, plus grit serve and a library program. Everyday history work (log, blame, diff, many refs once packed, distant switch, add/commit, big-binary add) is on par with or faster than git, but Windows file-system costs are a clear gap: clean status is 2.9x git at 200k files, the first status/diff after thousands of edits is 30x git because grit opens files git never opens, a >260-char path is reported deleted, and clone of 200k files is 30-40% slower. Of 6 re-checked fixes, 4 hold (#2570, #2568, #2569, #2574) and 2 still reproduce (#2563, #2390).
| repo | files | commits | .git | notes |
|---|---|---|---|---|
| scratch/mono-200k (git-created clone mono-git) | 200,005 | 304 | 974 MB | synthetic 200,004 src files + 4 x 40 MB binaries, fast-imported; later a 30k-file branch and a 768 MB file |
| scratch/mono-200k (grit-created clone mono-grit) | 200,005 | 307 | 974 MB | cloned with grit, used for grit-side measurements |
| git/git | 4,866 | 82,797 | 323 MB | HEAD fbd2d1e765 |
| scratch/refs-test (git/git clone + 61k branches) | 4,866 | 82,797 | 338 MB | |
| scratch/twin, t2563, t2569, t2570 | — | — | — | tiny hand-built repos for path edge cases and fix re-checks |
| command | repo | grit | git | grit/git | result | notes |
|---|---|---|---|---|---|---|
| grit status (clean) | scratch/mono-200k | 517 ms | 176 ms | 2.9× | ok | 2.9x git, 340 ms slower (#2584); sys time 1.2 s; memory equal (git = job-wide commit) |
| grit status --threads 1 | scratch/mono-200k | 1.29 s | 176 ms | 7.4× | slow | 7.3x |
| grit status (5000 edited files, first run) | scratch/mono-200k | 5.98 s | 197 ms | 30× | slow | 30x (#2585); second run 464 ms |
| grit diff --stat (5000 edited, first run) | scratch/mono-200k | 7.50 s | 1.24 s | 6.1× | slow | 6x cold, ~1x warm (675 vs 682 ms) |
| grit add (5000 modified) | scratch/mono-200k | 3.92 s | 9.19 s | 0.4× | ok | grit faster |
| grit commit (5000 files) | scratch/mono-200k | 2.57 s | 1.93 s | 1.3× | ok | |
| grit switch other / main (30k files differ) | scratch/mono-200k | 4.50 s | 7.95 s | 0.6× | ok | first status after switch 941 ms vs 293 ms |
| grit clone (local path) | scratch/mono-200k | 55.03 s | 38.91 s | 1.4× | ok | 1.4x slower; checkout 50.5 s + finish 7.2 s (#2588); memory 328 MB top process vs 100 MB git tree: below the bar |
| grit gc | scratch/mono-200k | 1.93 s | 2.05 s | 0.9× | ok | |
| grit add / commit / switch / gc with 768 MB file | scratch/mono-200k | 1.71 s | 20.89 s | 0.1× | ok | commit 1286 vs 270 ms, switch 870 vs 3011 ms, gc 3242 vs 19491 ms; fsck clean |
| grit log --oneline -n 200 -- builtin/commit.c | git/git | 198 ms | 208 ms | 1.0× | ok | |
| grit log --json -n 1000 -- Documentation | git/git | 105 ms | 148 ms | 0.7× | ok | |
| grit revs --count HEAD | git/git | 477 ms | 620 ms | 0.8× | ok | |
| grit log --follow -n 100 -- builtin/log.c | git/git | 181 ms | 329 ms | 0.6× | ok | |
| grit diff --stat v2.40.0 v2.45.0 | git/git | 182 ms | 415 ms | 0.4× | ok | |
| grit blame --json -- builtin/commit.c | git/git | 718 ms | 579 ms | 1.2× | ok | 4 of 1993 lines attributed differently |
| grit blame --json -- Makefile | git/git | 1.45 s | 1.06 s | 1.4× | ok | 11 of 4144 lines differ; see #2572 for timing |
| grit blame --json -- revision.c | git/git | 1.10 s | 1.02 s | 1.1× | ok | 4 of 4833 lines differ |
| grit clone (local path) | git/git | 1.83 s | 1.61 s | 1.1× | ok | |
| grit branch (61k loose refs, first read after git wrote them) | scratch/refs-test | 236.09 s | 2.63 s | 90× | slow | first-open cost of freshly written files, see #2585; 1.8 s on repeat |
| grit branch --json (61k refs) | scratch/refs-test | 2.02 s | 2.63 s | 0.8× | ok | |
| grit gc (61k loose refs) | scratch/refs-test | 263.45 s | — | — | slow | pack-refs 19.8 s, reflog-expire 239.8 s (#2585); git gc not run on this copy |
| grit branch (61k packed refs) | scratch/refs-test | 86 ms | 406 ms | 0.2× | ok | |
| grit status (61k refs) | scratch/refs-test | 66 ms | 117 ms | 0.6× | ok | |
| grit stash / stash pop (deleted file and dir) | scratch/t2570 | — | — | — | ok | #2570 fixed |
| grit bundle verify / unbundle (unreferenced prerequisite) | scratch/t2569 | — | — | — | ok | #2569 fixed |
| grit clone (tree with back\slash.txt) | scratch/t2563 | — | — | — | wrong | writes back/slash.txt, git rejects (#2563 reopened) |
| grit clone / status (trees with reserved names, trailing dot, colon, GIT~1, case collision) | scratch/twin | — | — | — | ok | matches git's rejections; collision warned |
| grit status / diff (path of ~380 chars) | scratch/twin | — | — | — | wrong | existing file reported deleted (#2586) |
| git clone through grit serve | git/git | 18.39 s | — | — | ok | fsck clean; serve peak WS 520-940 MB during a full clone |
| grit serve POST 12M duplicate wants (tip) | scratch/small | 400 ms | — | — | memory | serve peak 26 MB idle -> 769 MB; stdio upload-pack ~540 MB (#2390) |
| grit serve POST 100k duplicate wants (non-tip) | git/git | 265.60 s | — | — | slow | 1.3 ms per want (#2587) |
| grit-lib Repository::discover + status().run (library) | scratch/mono-200k | 302 ms | — | — | ok | 4 concurrent statuses on a shared handle ~1.0 s each |