summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan Hardison <dylan@mozilla.com>2016-02-29 18:58:40 +0100
committerDylan Hardison <dylan@mozilla.com>2016-02-29 18:59:15 +0100
commit51294863c5d2b12805cc7a95ef46aa33bec17450 (patch)
tree350d8ba6d197a1964af63374fe44cfd5fa6b8270 /Bugzilla
parente9b54b1353f5f51c6300d6552c880de0d26863f3 (diff)
downloadbugzilla-51294863c5d2b12805cc7a95ef46aa33bec17450.tar.gz
bugzilla-51294863c5d2b12805cc7a95ef46aa33bec17450.tar.xz
Bug 1251047 - /rest/bug/field takes 15-25 seconds to return
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/User.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 1a0deed6b..04b3d32ad 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -55,7 +55,7 @@ use Bugzilla::BugUserLastVisit;
use DateTime::TimeZone;
use List::Util qw(max);
-use List::MoreUtils qw(any);
+use List::MoreUtils qw(any bsearch);
use Scalar::Util qw(blessed);
use Storable qw(dclone);
use URI;
@@ -1302,7 +1302,7 @@ sub clear_product_cache {
sub can_see_product {
my ($self, $product_name) = @_;
- return scalar(grep {$_->name eq $product_name} @{$self->get_selectable_products});
+ return bsearch { $_->name cmp $product_name } @{$self->get_selectable_products};
}
sub get_selectable_products {