The Wayback Machine - https://web.archive.org/web/20210915130440/https://github.com/go-gitea/gitea/pull/16467/
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

Defer Last Commit Info #16467

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

Conversation

@zeripath
Copy link
Contributor

@zeripath zeripath commented Jul 17, 2021

One of the biggest reasons for slow repository browsing is that we wait
until last commit information has been generated for all files in the
repository.

This PR proposes deferring this generation to a new POST endpoint that
does the look up outside of the main page request.

Signed-off-by: Andrew Thornton [email protected]

One of the biggest reasons for slow repository browsing is that we wait
until last commit information has been generated for all files in the
repository.

This PR proposes deferring this generation to a new POST endpoint that
does the look up outside of the main page request.

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Contributor Author

@zeripath zeripath commented Jul 17, 2021

This is a reworking of part of #16063

@zeripath
Copy link
Contributor Author

@zeripath zeripath commented Jul 17, 2021

Another option here is to not attempt to generate last commit data in the main loop and leave that to the lastcommit post instead.

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Jul 17, 2021

Codecov Report

Merging #16467 (69a3e81) into main (d9ef43a) will decrease coverage by 0.01%.
The diff coverage is 37.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16467      +/-   ##
==========================================
- Coverage   45.38%   45.36%   -0.02%     
==========================================
  Files         757      757              
  Lines       85194    85257      +63     
==========================================
+ Hits        38664    38677      +13     
- Misses      40273    40312      +39     
- Partials     6257     6268      +11     
Impacted Files Coverage Δ
modules/git/last_commit_cache_nogogit.go 38.77% <0.00%> (+2.92%) ⬆️
modules/git/commit_info_nogogit.go 61.85% <23.52%> (+1.24%) ⬆️
modules/git/log_name_status.go 61.13% <25.00%> (-1.37%) ⬇️
routers/web/repo/view.go 40.41% <40.00%> (-1.12%) ⬇️
modules/git/last_commit_cache.go 100.00% <100.00%> (ø)
modules/git/notes_nogogit.go 75.00% <100.00%> (ø)
routers/web/web.go 90.53% <100.00%> (+0.01%) ⬆️
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/queue/workerpool.go 53.05% <0.00%> (-2.30%) ⬇️
models/repo_list.go 76.86% <0.00%> (-0.79%) ⬇️
... 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 d9ef43a...69a3e81. Read the comment docs.

@zeripath zeripath mentioned this pull request Aug 30, 2021
2 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants