Closed Bug 1033955 Opened 10 years ago Closed 10 years ago

backport bug 1028795 to bmo (pre-load all related bugs during show_bug initialisation)

Categories

(bugzilla.mozilla.org :: General, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1028795 +++

currently if a bug is referenced in a comment (either by the comment text, or as a duplicate) the rows for each referenced bug is loaded one at a time from the database.

for bugs with a lot of duplicates or comments this can be a costly exercise.

we should extract referenced bugs from comments, load them in a list with a single db query, and populate the object cache with the returned bug objects.
Attached patch 1033955_1.patchSplinter Review
this is a straight backport, however there were merge conflicts so i'd like another set of eyes on it.
Attachment #8450037 - Flags: review?(dkl)
Comment on attachment 8450037 [details] [diff] [review]
1033955_1.patch

Review of attachment 8450037 [details] [diff] [review]:
-----------------------------------------------------------------

::: Bugzilla/Bug.pm
@@ +549,5 @@
> +                        unless Bugzilla::Bug->object_cache_get($bug_id);
> +                });
> +        }
> +    }
> +

I think we need to also do visible_bugs here for a slight more improvement:

   Bugzilla->user->visible_bugs(\@referenced_bug_ids);

Can add on checkin. r=dkl
Attachment #8450037 - Flags: review?(dkl) → review+
(In reply to David Lawrence [:dkl] from comment #2)
> I think we need to also do visible_bugs here for a slight more improvement

indeed!  filed as bug 1035080 upstream, included in this commit.

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   3f631ad..2721de5  master -> master
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: