Closed Bug 1143874 Opened 11 years ago Closed 11 years ago

Improve load time of bug comments

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement)

4.5.6
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

Attached patch patch, v1 (obsolete) — Splinter Review
From bug 912531 comment 11: - Bugzilla::Comment->preload() was loading all comment tags at once to save some time. That's a good idea! The problem is that it didn't set $comment->{tags} = [] for comments with no tags, and each comment was querying the DB again to get them. I fixed this regression. - Each comment was calling Bugzilla->params->{'comment_taggers_group'} and Bugzilla->params->{'collapsed_comment_tags'} several times. Despite Bugzilla->params is pretty fast, this represented 1000+ calls in my testing, which was by far the most consuming part of all calls made to Bugzilla->params. I now store their value using |state $foo|, which is way faster. - bug.check_can_change_field('longdesc', ...) was called twice per comment. It's now called only once per *bug*!
Attachment #8578269 - Flags: review?(dkl)
Attached patch patch, v1.1Splinter Review
Fix the indentation
Attachment #8578269 - Attachment is obsolete: true
Attachment #8578269 - Flags: review?(dkl)
Attachment #8578272 - Flags: review?(dkl)
Comment on attachment 8578272 [details] [diff] [review] patch, v1.1 Review of attachment 8578272 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. r=dkl
Attachment #8578272 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval5.0?
Flags: approval?
Flags: approval5.0?
Flags: approval5.0+
Flags: approval+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 0d95dec..b188683 master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 9c9eac9..c2c8f77 5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: