git-status optimized for windows
The intent is to try and re-implement git status so that it can run better on windows. In particular for repositories that have submodules.
For example using a small repo (12 files) with 2 submodules and the libgit2 status example:
git statustakes ~150mslibgit2takes ~90ms
This was tested against git for windows version 2.29.
Though these times are fairly small, they start to really show up when one gets to larger repositories.
Note: The time for
libgitmay be a little misleading aslibgit2does not support full git status functionality
git2-rs is being used for some of the backend logic.
It provides much of the git plumbing functionality. However git2-rs
does not support running multi-threaded and in particular in comparing the working tree multi-threaded
seems to really perform. So the working tree comparison is more or less re-implemented.
I've been trying to blog a bit about the development process at https://speedyleion.github.io/. This would probably give a better idea of the design progress, since the functional progress is taking a bit.
Note: Since I chose to also take this opportunity to learn Rust, it means that the status on this will most likely be slow as I spin up on all the nuances of Rust.
Currently win-git-status.exe will produce a message similar to git status
For example one could do:
win-git-status.exe
The --short flag is also partially supported. The supported short format is
simpler implementation than the standard git version. It lacks combining
files that are both staged and have unstaged changes into one line. Submodules
will be treated as modified if there is any difference.
This currently doesn't handle significant features like:
- info/exclude file
- merge states
- rebase states
- cherry-pick states
- bisect state
- rename detection
For repos without submodules win-git-status currently does not perform as well as
git status.
Running on this repo:
- 0.044s for
git status - 0.055s for
win-git-status.exe
Running on llvm-project
- 0.335s for
git status - 0.495s for
win-git-status.exe
For repos with submodules win-git-status.exe can be up to 6-7x faster at times.
For one proprietary repo:
- 1.8s for
git status - 0.3s for
win-git-status.exe
For another proprietary repo:
- 5.9s for
git status - 0.5s for
win-git-status.exe