Skip to content

Prep track builder#11

Merged
peso merged 12 commits into
git-bahn:masterfrom
peso:prep-track-builder
Jul 2, 2026
Merged

Prep track builder#11
peso merged 12 commits into
git-bahn:masterfrom
peso:prep-track-builder

Conversation

@peso

@peso peso commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code cleanup in preparation for track::Builder which will be used for incremental construction of TrackMap.

  • Remove threading features
  • Separate git backend code to module git2
  • Prepare a limited range of rendering
  • Hint that struct GitGraph will be deprecated.
  • Stronger type check on index and less memory usage

peso added 6 commits July 2, 2026 05:50
This makes it much easier to use the API, in particular when
Builder is a long-running operation
TrackMay may need a mutex in some context, but it doesn't
in legacy setup (GitGraph) and it doesn't always in new
usage (gitui). Gleisbau does not create a thread by itself.

Therefore it should be the library user that adds a mutex.
Gleisbau should be able to work with any repository library,
in particular both git2 and gix. To reduce the dependency
some central structs are abstracted. In this case Commit Id.

This opens for a more memory efficient implementation that
uses an index instead of the real id.
@peso
peso force-pushed the prep-track-builder branch from 46c9962 to 3fa7b3a Compare July 2, 2026 04:17
peso added 6 commits July 2, 2026 22:57
Normal usize index is 8 bytes. Using u32 we save 4 bytes
times the number of index stored.

This macro makes it easy to define a new index type
Save 1 byte for each commit
@peso
peso force-pushed the prep-track-builder branch from 0cbf424 to 385a4b6 Compare July 2, 2026 20:58
@peso
peso merged commit dae3bf6 into git-bahn:master Jul 2, 2026
2 checks passed
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.

1 participant