aboutsummaryrefslogtreecommitdiffstats
path: root/docker/root/etc/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2025-06-13 02:12:45 +0800
committerGitHub <noreply@github.com>2025-06-12 18:12:45 +0000
commitd21ce9fa0739a954e2ecbc5d2aa1e324b5781a4b (patch)
tree9e7f105d6c33857710f7a39135dd53624e8e7399 /docker/root/etc/templates
parent8fed27bf6a8a7582a3b2afcda7842b735f6ea5bd (diff)
downloadgitea-main.tar.gz
gitea-main.zip
Improve the performance when detecting the file editable (#34653)HEADmain
Noticed the SQL will be executed 4 times when visit the file render view page. For a repository which have many pull requests, it maybe slow. ```SQL 2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 2.004167ms 2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 1.03975ms 2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 881.583µs 2025/06/08 15:24:44 models/issues/pull_list.go:69:GetUnmergedPullRequestsByHeadInfo() [I] [SQL] SELECT * FROM `pull_request` INNER JOIN `issue` ON issue.id = pull_request.issue_id WHERE (head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?) [393 main false false 0] - 935.084µs ``` This PR did a refactor to query it once only.
Diffstat (limited to 'docker/root/etc/templates')
0 files changed, 0 insertions, 0 deletions