Skip to content

Conversation

@zeripath
Copy link
Contributor

Continuing on from #15447

This PR is an attempt to reduce the performance issues noted in #15413 and #15401

@zeripath zeripath added performance/speed performance issues with slow downs backport/v1.14 labels Apr 13, 2021
@zeripath zeripath added this to the 1.15.0 milestone Apr 13, 2021
@zeripath zeripath changed the title Slight performance improvement for last commit cache Slight performance improvement for last commit cache and show-ref Apr 13, 2021
@zeripath zeripath changed the title Slight performance improvement for last commit cache and show-ref Performance improvement for last commit cache and show-ref Apr 13, 2021
case "commit":
return CommitFromReader(repo, id, io.LimitReader(bufReader, size))
default:
_ = stdoutReader.CloseWithError(fmt.Errorf("unknown typ: %s", typ))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was always unnecessary so it can be removed

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 13, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 30, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 1, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #15455 (de49ada) into master (fda2e45) will decrease coverage by 0.00%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15455      +/-   ##
==========================================
- Coverage   43.91%   43.90%   -0.01%     
==========================================
  Files         678      678              
  Lines       81827    81838      +11     
==========================================
+ Hits        35932    35933       +1     
- Misses      40051    40055       +4     
- Partials     5844     5850       +6     
Impacted Files Coverage Δ
modules/git/last_commit_cache_nogogit.go 35.18% <50.00%> (-1.36%) ⬇️
modules/git/commit_info_nogogit.go 70.09% <100.00%> (+0.29%) ⬆️
modules/git/repo_commit_nogogit.go 66.19% <100.00%> (+5.25%) ⬆️
modules/indexer/stats/db.go 50.00% <0.00%> (-10.72%) ⬇️
modules/git/tree_nogogit.go 60.86% <0.00%> (-8.70%) ⬇️
modules/process/manager.go 72.83% <0.00%> (-2.47%) ⬇️
modules/git/repo_language_stats_nogogit.go 44.57% <0.00%> (-2.41%) ⬇️
modules/queue/workerpool.go 58.77% <0.00%> (-1.23%) ⬇️
models/repo_list.go 77.04% <0.00%> (-0.78%) ⬇️
routers/repo/view.go 41.24% <0.00%> (+0.58%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fda2e45...de49ada. Read the comment docs.

@6543 6543 merged commit a926ff9 into go-gitea:master May 2, 2021
@zeripath zeripath deleted the slight-performance-improvement-for-last-commit-cache branch May 2, 2021 06:35
zeripath added a commit to zeripath/gitea that referenced this pull request May 2, 2021
…15455)

Backport go-gitea#15455

* Improve performance when there are multiple commits in the last commit cache

* read refs directly if we can

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 2, 2021
6543 pushed a commit that referenced this pull request May 3, 2021
…15701)

Backport #15455

* Improve performance when there are multiple commits in the last commit cache

* read refs directly if we can

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath mentioned this pull request May 9, 2021
12 tasks
@go-gitea go-gitea locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. performance/speed performance issues with slow downs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants