From 39888980be9924ebdd05913b0c8fbb92bf99fcf1 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Mon, 1 Aug 2011 10:35:09 +0200 Subject: Bug 634812: Having a very large number of custom fields can make displaying show_bug.cgi slow r=glob a=LpSolit --- Bugzilla/Template.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index d8822272f..64c18c64c 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -936,6 +936,11 @@ sub create { # it only once per-language no matter how many times # $template->process() is called. 'field_descs' => sub { return template_var('field_descs') }, + + # Calling bug/field-help.none.tmpl once per label is very + # expensive, so we generate it once per-language. + 'help_html' => sub { return template_var('help_html') }, + # This way we don't have to load field-descs.none.tmpl in # many templates. 'display_value' => \&Bugzilla::Util::display_value, -- cgit v1.2.3-24-g4f1b