incubator-devlake
incubator-devlake copied to clipboard
[Bug][Go-Git] Libgit2 has a better performance then go-git
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
I'm using the developer setup of DevLake and while collecting the data for the same project I noticed that by using libgit2 it takes 3 minutes and with go-git, it takes ~43 minutes this is an outrageous performance penalty.
What do you expect to happen
There shouldn't be this outrageous difference. Because it slowest the process by almost 20 times.slowed
How to reproduce
Go to the .env (env.example) file and change the value of this variable USE_GO_GIT_IN_GIT_EXTRACTOR=false
Collect the data for the same project and see the time duration when you use go-git and libgit2
Anything else
No response
Version
dev
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Yeah, it is too much... We were hoping the go-git could help with Incremental Data Collection and Canceling during Clone phase which doesn't seem to be possible with libgit2
You're right, and we have to delay switching to go-git.
Since DevLake reads the repo, if go-git can be thread safe when reading, we can test then and see if we can switch to go-git.
BTW, go-git is about 6 time slower than libgit2 in my test case.
Even though go-git may provide some features that libgit2 doesn't, I agree with @d4x1 that it's better to keep it on testing and see if the time difference can be improved in go-git.
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.