loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

improve possible performance bottleneck (#28547)

Replace #28500

---------

Co-authored-by: Giteabot <teabot@gitea.io>

authored by

Lunny Xiao
Giteabot
and committed by
GitHub
b35d3fdd 31426938

+3 -8
+3 -8
models/issues/comment.go
··· 1161 1161 // UpdateCommentsMigrationsByType updates comments' migrations information via given git service type and original id and poster id 1162 1162 func UpdateCommentsMigrationsByType(ctx context.Context, tp structs.GitServiceType, originalAuthorID string, posterID int64) error { 1163 1163 _, err := db.GetEngine(ctx).Table("comment"). 1164 - Where(builder.In("issue_id", 1165 - builder.Select("issue.id"). 1166 - From("issue"). 1167 - InnerJoin("repository", "issue.repo_id = repository.id"). 1168 - Where(builder.Eq{ 1169 - "repository.original_service_type": tp, 1170 - }), 1171 - )). 1164 + Join("INNER", "issue", "issue.id = comment.issue_id"). 1165 + Join("INNER", "repository", "issue.repo_id = repository.id"). 1166 + Where("repository.original_service_type = ?", tp). 1172 1167 And("comment.original_author_id = ?", originalAuthorID). 1173 1168 Update(map[string]any{ 1174 1169 "poster_id": posterID,