Skip to content

Conversation

GiteaBot
Copy link
Collaborator

@GiteaBot GiteaBot commented Jan 7, 2025

Backport #33106 by @lunny

This PR fixes a performance problem when reviewing a pull request in a big instance which have many records in the review table. Traditionally, we should add more indexes in that table. But since dismissed reviews of 1 pull request will not be too many as expected in a common repository. Filtering reviews in the memory should be more quick .

…educe slow response because of lacking database index (go-gitea#33106)

This PR fixes a performance problem when reviewing a pull request in a
big instance which have many records in the `review` table.
Traditionally, we should add more indexes in that table. But since
dismissed reviews of 1 pull request will not be too many as expected in
a common repository. Filtering reviews in the memory should be more
quick .

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added modifies/go Pull requests that update Go code performance/speed performance issues with slow downs labels Jan 7, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 7, 2025
@GiteaBot GiteaBot added this to the 1.23.0 milestone Jan 7, 2025
@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 Jan 7, 2025
@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 Jan 8, 2025
@lunny lunny merged commit b4f0eed into go-gitea:release/v1.23 Jan 8, 2025
26 checks passed
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. 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