From: Dylan William Hardison Date: Mon, 10 Apr 2017 16:28:57 +0000 (-0400) Subject: Bug 1355134 - Bugzilla::Bug->groups(): use fetchall_arrayref() for increased performance X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f9310f31d68fad232e84d6c80481fd5d060bdd8;p=thirdparty%2Fbugzilla.git Bug 1355134 - Bugzilla::Bug->groups(): use fetchall_arrayref() for increased performance --- 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;