Skip to content

Use tag's database num commits instead of read the commit counts from git data #34191

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 13, 2025

It will be slow to get the commits count for a tag of a big repository. But the commits count has been stored in the table release of the database. We could just use that value.

 git-run duration=1.4821s func.caller=git.CommitsCount git.command="/usr/bin/git ...global... rev-list --count 1aa3f624c40852b36a14c479daae1fc879f3d3bf"

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 13, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Apr 13, 2025
@lunny lunny added performance/speed performance issues with slow downs and removed modifies/go Pull requests that update Go code labels Apr 13, 2025
@lunny lunny added this to the 1.24.0 milestone Apr 13, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Apr 13, 2025
@wxiaoguang
Copy link
Contributor

I do not think it's right to keep patching the old code by more hacky code.

Why can't it get a clear solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code performance/speed performance issues with slow downs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants