Closed Bug 556045 Opened 14 years ago Closed 13 years ago

get_bug_link() requests the localized bug status and resolution too many times

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: LpSolit, Assigned: mkanat)

References

Details

(Keywords: perf, Whiteboard: [fixed by blocker])

Attachments

(1 file)

Attached patch patch, v0.9Splinter Review
Bug 498309 did a great job at reducing the time spent in quoteUrls(). But every time you linkify "bug 1234567", you also look for the bug status and resolution to use in the tooltip, which means a call to get_text('get_status') and get_text('get_resolution') for each link. For a given language, these bug statuses and resolutions never change, and so we should cache them to avoid calling get_text() too many times.

When viewing ~80 bugs in Long Format (from buglist.cgi), it takes 10.5 seconds to display them all, among which 4 seconds are spent in quoteUrls(). With the attached patch applied, it now takes 7.5 seconds, among which 1 second is spent in quoteUrls(). I don't know if this patch is the one we want, but it's a proof of concept that there is a huge improvement possible here.
Attachment #435964 - Flags: review?(mkanat)
Comment on attachment 435964 [details] [diff] [review]
patch, v0.9

  Instead of this, I was planning to move display_value into Perl code (by making value_descs into a template_var variable and then creating a display_value function in Bugzilla::Util or Bugzilla::Template and having Bugzilla::Template reference it). Then we wouldn't even have to use get_text, and we could use display_value in other places (like for bugmail diffs).
Attachment #435964 - Flags: review?(mkanat) → review-
Keywords: perf
Maybe bug 595410 will fix it, or at least be a first step in this direction.
Depends on: 595410
Ah, yeah, I'm pretty sure the blocker will fully fix it.
Whiteboard: [blocker will fix]
Assignee: create-and-change → mkanat
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [blocker will fix] → [fixed by blocker]
Target Milestone: Bugzilla 3.6 → Bugzilla 4.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: