-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Performance improvement for last commit cache and show-ref #15455
Performance improvement for last commit cache and show-ref #15455
Conversation
…t cache Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
@@ -106,7 +124,6 @@ func (repo *Repository) getCommit(id SHA1) (*Commit, error) { | |||
case "commit": | |||
return CommitFromReader(repo, id, io.LimitReader(bufReader, size)) | |||
default: | |||
_ = stdoutReader.CloseWithError(fmt.Errorf("unknown typ: %s", typ)) |
There was a problem hiding this comment.
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
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
…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 <art27@cantab.net>
Continuing on from #15447
This PR is an attempt to reduce the performance issues noted in #15413 and #15401