diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-09 04:00:31 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-09 04:00:31 +0200 |
commit | 30084ede70b1f17b620f5bb5d38ccabb3321f5df (patch) | |
tree | e55efb88fa4db408220e73d0279702ed35af7403 /Bugzilla/Template.pm | |
parent | 3f40ba04a7bdea2f3f84202006cc55054d647afb (diff) | |
download | bugzilla-30084ede70b1f17b620f5bb5d38ccabb3321f5df.tar.gz bugzilla-30084ede70b1f17b620f5bb5d38ccabb3321f5df.tar.xz |
Bug 576670: Optimize Search.pm's "init" method for being called many times
in a loop
r=glob, a=mkanat
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 4bd3d2d77..2c2d402a3 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -765,8 +765,8 @@ sub create { # A way for all templates to get at Field data, cached. 'bug_fields' => sub { my $cache = Bugzilla->request_cache; - $cache->{template_bug_fields} ||= - { map { $_->name => $_ } Bugzilla->get_fields() }; + $cache->{template_bug_fields} ||= + Bugzilla->fields({ by_name => 1 }); return $cache->{template_bug_fields}; }, |