open-sauced / pizza

This is an engine that sources git commits and turns them to insights
Apache License 2.0
31 stars 13 forks source link

Feature: investigate using git2go #18

Closed jpmcb closed 1 year ago

jpmcb commented 1 year ago

Type of feature

🍕 Feature

Current behavior

Currently, the proof-of-concept uses git-go, which is a pure implementation of git APIs in Go. Some of the critical performance bottlenecks (primarily cloning, fetching, pulling repos) have been abit lackluster.

Suggested solution

It may be beneficial to investigate and look into using git2go: https://github.com/libgit2/git2go which are Go bindings for lib2git, the git APIs implemented in C designed to be portable and fast. While the Go APIs we use would be almost the same, this could complicate our build process since we'd also need to build in the C bindings for lib2git.

Additional context

At this early stage (and especially before we enter any kind of production use case) this is a good time to get wild and try a few different things.

Code of Conduct

Contributing Docs

jpmcb commented 1 year ago

After some investigating, there doesn't seem to be too many crazy optimizations we get from using git2go. And we'd have to take on a few build time dependencies on some compiled C code which could really slow us down.

In the future, if we really need to change things up for performance, we should look into a re-write with gitoxide, a pure rust implementation of git protocols that looks really fast: https://github.com/Byron/gitoxide

But for now, this gets us pretty far!