Closed wfrisch closed 6 months ago
A quick test suggests that in-process pygit2.Repository.describe()
is about a magnitude faster than spawning git describe
subprocesses. This is definitely worth it and necessary for very large repos like ffmpeg.
Indexing is already slow, but it becomes a problem if we want to add large libraries like ffmpeg with over 130000 commits. The main culprit is
git describe
which has to be executed for every commit. libgit2 can do this in-process, and thus much faster.libgit2's has Python bindings available in pygit2 [2]
[1] https://libgit2.org/ [2] https://www.pygit2.org/