summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2011-08-01 10:35:09 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2011-08-01 10:35:09 +0200
commit39888980be9924ebdd05913b0c8fbb92bf99fcf1 (patch)
tree930db47dbcc17c83aba5fab95bac90593bff61cd /Bugzilla/Template.pm
parentbc82259f9284e3d682536086637ace46cd8ab6ea (diff)
downloadbugzilla-39888980be9924ebdd05913b0c8fbb92bf99fcf1.tar.gz
bugzilla-39888980be9924ebdd05913b0c8fbb92bf99fcf1.tar.xz
Bug 634812: Having a very large number of custom fields can make displaying show_bug.cgi slow
r=glob a=LpSolit
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm5
1 files changed, 5 insertions, 0 deletions
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,