Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][Go-Git] Libgit2 has a better performance then go-git #7202

Open
2 of 3 tasks
Geni2 opened this issue Mar 21, 2024 · 4 comments
Open
2 of 3 tasks

[Bug][Go-Git] Libgit2 has a better performance then go-git #7202

Geni2 opened this issue Mar 21, 2024 · 4 comments
Labels
type/feature-request This issue is a proposal for something new

Comments

@Geni2
Copy link

Geni2 commented Mar 21, 2024

Search before asking

  • 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

@Geni2 Geni2 added the type/bug This issue is a bug label Mar 21, 2024
@Geni2 Geni2 changed the title [Bug][Module Name] Libgit2 has a better performance then go-git [Bug][Go-Git] Libgit2 has a better performance then go-git Mar 21, 2024
@klesh
Copy link
Contributor

klesh commented Mar 21, 2024

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

@d4x1
Copy link
Contributor

d4x1 commented Mar 22, 2024

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.

@Geni2
Copy link
Author

Geni2 commented Mar 25, 2024

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.

@Startrekzky Startrekzky added type/feature-request This issue is a proposal for something new and removed type/bug This issue is a bug labels Apr 15, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label Jun 15, 2024
@d4x1 d4x1 removed the Stale label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request This issue is a proposal for something new
Projects
None yet
Development

No branches or pull requests

4 participants