From 4f9310f31d68fad232e84d6c80481fd5d060bdd8 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 10 Apr 2017 12:28:57 -0400 Subject: Bug 1355134 - Bugzilla::Bug->groups(): use fetchall_arrayref() for increased performance --- Bugzilla/Bug.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index cba973863..e7ab3d4a7 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3973,8 +3973,10 @@ sub groups { $sth->execute($self->{'bug_id'}, $self->{'product_id'}); - while (my ($groupid, $name, $description, $ison, $ingroup, $isactive, - $membercontrol, $othercontrol) = $sth->fetchrow_array()) { + my $rows = $sth->fetchall_arrayref(); + foreach my $row (@$rows) { + my ($groupid, $name, $description, $ison, $ingroup, $isactive, + $membercontrol, $othercontrol) = @$row; $membercontrol ||= 0; -- cgit v1.2.3-24-g4f1b