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

Use of GitPython causes git log operations to slow on the repository #1006

Closed
ndimiduk opened this issue Apr 10, 2020 · 2 comments
Closed

Use of GitPython causes git log operations to slow on the repository #1006

ndimiduk opened this issue Apr 10, 2020 · 2 comments

Comments

@ndimiduk
Copy link

@ndimiduk ndimiduk commented Apr 10, 2020

Hello,

I've been using your nice library over in Apache HBase as a part of git-jira-release-audit. I've noticed that after running the tool with --parse-release-tags, which makes many calls to Repo.git.name_rev, calls to git log on the command line become extremely slow. It seems like the repository is somehow left with lots of garbage after it's been parsed by GitPython. Does this make sense, sound even plausible?

You can see my requirements file there, using GitPython==3.0.5.

$ git --version
git version 2.20.1 (Apple Git-117)

Thanks,
Nick

@Byron
Copy link
Member

@Byron Byron commented Apr 11, 2020

Hi @ndimiduk ,

GitPython is expected to not write/modify the repository during read-only operations, and for now I would assume it indeed behaves that way.

However, since it calls out to git name-rev, there might be undesirable side-effects. It seems odd to think that the latter git command could be responsible for that either.

Maybe you can copy a 'fast', unprocessed repository, run the git-jira-release-audit command on one of them, to finally diff the directories using something like diff -r <copy> <processed>. The hypothesis here is that the audit command alters the state of the repository, even though it shouldn't, and the diff would reveal the modifications.

@ndimiduk
Copy link
Author

@ndimiduk ndimiduk commented Apr 29, 2020

Sorry for the long silence. I have tried as you suggest and indeed, the diff result is empty. Curiouser and curiouser. Thank you for your patience!

@ndimiduk ndimiduk closed this Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.