summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-04-18 13:00:03 +0800
committertechknowlogick <matti@mdranta.net>2019-04-18 01:00:03 -0400
commitdd1acd7ce4b4afc5d1c803f85767def242a899bb (patch)
tree785f7698189353f46af91352fb71a086f2080968 /models/issue.go
parent2262811e407facea09047e94aa1850c192511587 (diff)
downloadgitea-dd1acd7ce4b4afc5d1c803f85767def242a899bb.tar.gz
gitea-dd1acd7ce4b4afc5d1c803f85767def242a899bb.zip
Comments list performance optimization (#5305)
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go
index 753345d38f..ddc7fa24af 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -272,6 +272,10 @@ func (issue *Issue) loadAttributes(e Engine) (err error) {
if err = issue.loadComments(e); err != nil {
return err
}
+
+ if err = CommentList(issue.Comments).loadAttributes(e); err != nil {
+ return err
+ }
if issue.isTimetrackerEnabled(e) {
if err = issue.loadTotalTimes(e); err != nil {
return err