Skip to content

[08/08] add benchmarks and graph internals documentation for migrated pipeline#102

Open
mjc wants to merge 65 commits into
asinglebit:mainfrom
mjc:mjc/gitoxide-spike-08-bench-docs
Open

[08/08] add benchmarks and graph internals documentation for migrated pipeline#102
mjc wants to merge 65 commits into
asinglebit:mainfrom
mjc:mjc/gitoxide-spike-08-bench-docs

Conversation

@mjc

@mjc mjc commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Stacked on mjc/gitoxide-spike-07-draw-status.

Why this PR exists:

  • This is the documentation and benchmark-fixture maintenance layer at the top of the stack.
  • Earlier PRs changed the graph pipeline, lane-cap representation, graph history storage, and gix-backed metadata shapes.
  • This PR updates GRAPH.MD so the documented graph model matches the final migrated implementation.
  • It also fixes benchmark fixtures so they construct graph/worktree data with the current migrated types.

What changed:

  • Updates GRAPH.MD to describe the current graph pipeline.
  • Replaces the older compressed-parent explanation with the current flattened lane-cap model.
  • Documents that flattened lanes are represented directly on Chunk through is_flattened.
  • Removes references to a separate compressed_parents side list.
  • Updates delta documentation to match the current delta ops:
    • Insert
    • Remove
    • Replace
    • Truncate
    • ReplaceAndTruncate
  • Updates graph history documentation from GraphSnapshot { lanes, compressed_parents } to lane snapshots.
  • Updates renderer notes so merge closeouts and dotted cap-lane rendering are described in terms of flattened cap lanes.
  • Updates the module map and vocabulary to match the migrated graph/buffer/rendering implementation.
  • Fixes benchmark fixtures for the current data model:
    • converts benchmark worktree heads from git2::Oid to gix::ObjectId
    • updates GraphRow fixture construction for the current fields and collection types

Algorithm difference:

  • No runtime behavior change is intended.
  • The documentation now describes the algorithm that already exists in the previous stack layers.
  • The benchmark fixture updates are type/shape fixes for the migrated graph and worktree metadata structures.

Performance story:

  • This PR does not add new benchmark results by itself.
  • It keeps benchmark fixtures aligned with the migrated graph data model so existing benchmark targets can continue to exercise the current pipeline.
  • Any performance claims should come from running the benchmark suite, not from this PR alone.

Correctness gate:

  • GRAPH.MD should match the actual graph implementation after the migration stack.
  • The docs should not describe removed structures such as compressed_parents.
  • Benchmark fixtures should compile against the current graph, worktree, and row metadata types.
  • No app, graph, query, action, or draw behavior should change in this layer.

Benchmark Results for the whole stack

Command shape: hyperfine --warmup 5 './target/release/guitar /home/mjc/src/linux --exit-when-graph-complete'.

CPU: M1 MacBook Pro 16GB

Ref Total vs main User System CPU
main 2:37.28 1.00x 118.00s 7.88s 80%
01-gix-boundary 1:43.99 1.51x 97.85s 2.33s 96%
02-gix-oids 1:14.26 2.12x 65.41s 2.17s 91%
03-graph-walker 5.816s 27.05x 1.82s 0.74s 43%
04-queries-readonly 3.812s 41.26x 1.47s 0.42s 49%
05-actions-network 1.993s 78.91x 1.47s 0.26s 87%
06-app-integration 1.826s 86.13x 1.51s 0.10s 88%
06-app-integration 1.879s 83.70x 1.44s 0.11s 82%
07-draw-status 1.618s 97.21x 1.36s 0.08s 89%

CPU: 5950x Linux/ZFS

Ref Total vs main User System CPU
main 1:39.24 1.00x 96.16s 1.72s 98%
01-gix-boundary 1:46.41 0.93x 101.28s 3.82s 98%
02-gix-oids 1:10.85 1.40x 69.07s 1.78s 100%
03-graph-walker 2.094s 47.39x 1.59s 0.55s 102%
04-queries-readonly 1.856s 53.47x 1.58s 0.46s 110%
05-actions-network 1.862s 53.30x 1.60s 0.49s 112%
06-app-integration 1.639s 60.55x 1.40s 0.22s 98%
07-draw-status 1.632s 60.81x 1.34s 0.18s 93%
08-bench-docs 1.629s 60.92x 1.36s 0.19s 94%

Memory: 5950x Linux/ZFS

Ref Peak heap Peak RSS
main 1.26G 2.81G
01-gix-boundary 1.26G 2.82G
02-gix-oids 1.38G 2.63G
03-graph-walker 455.13M 1.15G
04-queries-readonly 436.12M 977.18M
05-actions-network 436.12M 978.61M
06-app-integration 419.89M 853.30M
07-draw-status 419.89M 916.59M
08-bench-docs 419.89M 988.71M

mjc added 30 commits July 1, 2026 12:35
(cherry picked from commit 122fdf1)
Wire a no-TUI entry point that loads the repo, skips workdir status to avoid
case-colliding paths on case-insensitive filesystems, waits for the graph
walker to finish, prints the commit count, and shuts down background tasks.
(cherry picked from commit 4b30648)
(cherry picked from commit 427dce7)
(cherry picked from commit 9854674)
(cherry picked from commit 6ce842f)
(cherry picked from commit dac26d1)
(cherry picked from commit 77e669a)
(cherry picked from commit 1484548)
mjc added 27 commits July 1, 2026 13:26
(cherry picked from commit 4461f87)
(cherry picked from commit 4ccd4cc)
(cherry picked from commit 28598c0)
(cherry picked from commit 3ddc288)
(cherry picked from commit dc4e23c)
Skip commit diff refresh for the uncommitted pseudo-row when the first
GraphWindow is applied, and add a regression test that reproduces the
spike-06 TUI crash.
(cherry picked from commit c244fc5)
(cherry picked from commit 054ee9d)
(cherry picked from commit a9c3557)
(cherry picked from commit 30c9363)
(cherry picked from commit b99b0e9)
(cherry picked from commit 7b0b990)
Copilot AI review requested due to automatic review settings July 1, 2026 21:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants