]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1355134 - Bugzilla::Bug->groups(): use fetchall_arrayref() for increased performance
authorDylan William Hardison <dylan@hardison.net>
Mon, 10 Apr 2017 16:28:57 +0000 (12:28 -0400)
committerDylan William Hardison <dylan@hardison.net>
Mon, 10 Apr 2017 16:28:57 +0000 (12:28 -0400)
Bugzilla/Bug.pm

index cba9738638536144fcd2dfe358a34aa01d873279..e7ab3d4a71bea200c58611d8ec4cd1a6a039a227 100644 (file)
@@ -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;