Bug 897029: Preload bug permissions when calling Bug.get to improve performance
r/a=sgreen git-svn-id: svn://10.0.0.236/trunk@264931 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
405ee04790
commit
6738e57abc
@ -1 +1 @@
|
||||
8673
|
||||
8674
|
||||
@ -323,6 +323,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}) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user