diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-08-12 17:27:34 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-08-12 17:27:34 +0200 |
commit | afa23774e953411a0b7ad73739970d5b81495195 (patch) | |
tree | e8b1c7beaaab36caf5b464b082993184b0d06f5e /Bugzilla/WebService | |
parent | 8adaad7fda9776639d06f97703e2984e376232dc (diff) | |
download | bugzilla-afa23774e953411a0b7ad73739970d5b81495195.tar.gz bugzilla-afa23774e953411a0b7ad73739970d5b81495195.tar.xz |
Bug 899537 - backport upstream bug 897029 to bmo/4.2 for performance improvement
r=glob
Diffstat (limited to 'Bugzilla/WebService')
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index df9084210..34c16f99f 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -330,6 +330,12 @@ sub get { my @bugs; my @faults; + + # Cache permissions for bugs. This highly reduces the number of calls to the DB. + # visible_bugs() is only able to handle bug IDs, so we have to skip aliases. + my @int = grep { $_ =~ /^\d+$/ } @$ids; + Bugzilla->user->visible_bugs(\@int); + foreach my $bug_id (@$ids) { my $bug; if ($params->{permissive}) { |