summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-10-20 13:54:50 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-10-20 13:54:50 +0200
commitaa66bc8ab5ad344f156d9fc2895983ff2216b8a5 (patch)
treebb1e2578b7612254901f092a7c1961ff211905bc /template/en/default
parentfb85e2ee8fc510a607f60525f8c3b3978a9789df (diff)
downloadbugzilla-aa66bc8ab5ad344f156d9fc2895983ff2216b8a5.tar.gz
bugzilla-aa66bc8ab5ad344f156d9fc2895983ff2216b8a5.tar.xz
Bug 605693: Make config.cgi?ctype=rdf faster
r=timello a=LpSolit
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/config.rdf.tmpl26
-rw-r--r--template/en/default/filterexceptions.pl4
2 files changed, 19 insertions, 11 deletions
diff --git a/template/en/default/config.rdf.tmpl b/template/en/default/config.rdf.tmpl
index 0e74bfc44..3162bfd2c 100644
--- a/template/en/default/config.rdf.tmpl
+++ b/template/en/default/config.rdf.tmpl
@@ -19,6 +19,10 @@
# Frédéric Buclin <LpSolit@gmail.com>
#%]
+[%# The url to the installation is going to be displayed many times.
+ # So we cache it here for better performance.
+ %]
+[% escaped_urlbase = BLOCK %][% urlbase FILTER xml %][% END %]
<?xml version="1.0"[% IF Param('utf8') %] encoding="UTF-8"[% END %]?>
<!-- Note: this interface is experimental and under development.
- We may and probably will make breaking changes to it in the future. -->
@@ -27,7 +31,7 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:bz="http://www.bugzilla.org/rdf#">
-<bz:installation rdf:about="[% urlbase FILTER xml %]">
+<bz:installation rdf:about="[% escaped_urlbase %]">
<bz:install_version>[% constants.BUGZILLA_VERSION FILTER html %]</bz:install_version>
<bz:maintainer>[% Param('maintainer') FILTER html %]</bz:maintainer>
@@ -118,13 +122,13 @@
<Seq>
[% FOREACH product = products %]
<li>
- <bz:product rdf:about="[% urlbase FILTER xml %]product.cgi?name=[% product.name FILTER uri %]">
+ <bz:product rdf:about="[% escaped_urlbase %]product.cgi?name=[% product.name FILTER uri %]">
<bz:name>[% product.name FILTER html %]</bz:name>
<bz:components>
<Seq>
[% FOREACH component = product.components %]
- <li resource="[% urlbase FILTER xml %]component.cgi?name=[% component.name FILTER uri
+ <li resource="[% escaped_urlbase %]component.cgi?name=[% component.name FILTER uri
%]&amp;product=[% product.name FILTER uri %]"/>
[% END %]
</Seq>
@@ -133,7 +137,7 @@
<bz:versions>
<Seq>
[% FOREACH version = product.versions %]
- <li resource="[% urlbase FILTER xml %]version.cgi?name=[% version.name FILTER uri %]"/>
+ <li resource="[% escaped_urlbase %]version.cgi?name=[% version.name FILTER uri %]"/>
[% END %]
</Seq>
</bz:versions>
@@ -142,7 +146,7 @@
<bz:target_milestones>
<Seq>
[% FOREACH milestone = product.milestones %]
- <li resource="[% urlbase FILTER xml %]milestone.cgi?name=[% milestone.name FILTER uri %]"/>
+ <li resource="[% escaped_urlbase %]milestone.cgi?name=[% milestone.name FILTER uri %]"/>
[% END %]
</Seq>
</bz:target_milestones>
@@ -160,7 +164,7 @@
[% FOREACH product = products %]
[% FOREACH component = product.components %]
<li>
- <bz:component rdf:about="[% urlbase FILTER xml %]component.cgi?name=[% component.name FILTER uri
+ <bz:component rdf:about="[% escaped_urlbase %]component.cgi?name=[% component.name FILTER uri
%]&amp;product=[% product.name FILTER uri %]">
<bz:name>[% component.name FILTER html %]</bz:name>
[% IF show_flags %]
@@ -170,7 +174,7 @@
[% FOREACH flag_type = flag_types %]
[% NEXT UNLESS flag_type.is_active %]
[% all_visible_flag_types.${flag_type.id} = flag_type %]
- <li resource="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER uri
+ <li resource="[% escaped_urlbase %]flag.cgi?id=[% flag_type.id FILTER uri
%]&amp;name=[% flag_type.name FILTER uri %]" />
[% END %]
</Seq>
@@ -188,7 +192,7 @@
[% FOREACH product = products %]
[% FOREACH version = product.versions %]
<li>
- <bz:version rdf:about="[% urlbase FILTER xml %]version.cgi?name=[% version.name FILTER uri %]">
+ <bz:version rdf:about="[% escaped_urlbase %]version.cgi?name=[% version.name FILTER uri %]">
<bz:name>[% version.name FILTER html %]</bz:name>
</bz:version>
</li>
@@ -203,7 +207,7 @@
[% FOREACH product = products %]
[% FOREACH milestone = product.milestones %]
<li>
- <bz:target_milestone rdf:about="[% urlbase FILTER xml %]milestone.cgi?name=[% milestone.name FILTER uri %]">
+ <bz:target_milestone rdf:about="[% escaped_urlbase %]milestone.cgi?name=[% milestone.name FILTER uri %]">
<bz:name>[% milestone.name FILTER html %]</bz:name>
</bz:target_milestone>
</li>
@@ -218,7 +222,7 @@
<Seq>
[% FOREACH flag_type = all_visible_flag_types.values.sort('name') %]
<li>
- <bz:flag_type rdf:about="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER uri
+ <bz:flag_type rdf:about="[% escaped_urlbase %]flag.cgi?id=[% flag_type.id FILTER uri
%]&amp;name=[% flag_type.name FILTER uri %]">
<bz:id>[% flag_type.id FILTER html %]</bz:id>
<bz:name>[% flag_type.name FILTER html %]</bz:name>
@@ -243,7 +247,7 @@
[% PROCESS "global/field-descs.none.tmpl" %]
[% FOREACH item = field %]
<li>
- <bz:field rdf:about="[% urlbase FILTER xml %]field.cgi?name=[% item.name FILTER uri %]">
+ <bz:field rdf:about="[% escaped_urlbase %]field.cgi?name=[% item.name FILTER uri %]">
<bz:name>[% item.name FILTER html %]</bz:name>
<bz:description>[% (field_descs.${item.name} OR item.description) FILTER html %]</bz:description>
[%-# These values are meaningful for custom fields only. %]
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index 799371f63..099748122 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -504,4 +504,8 @@
'group.id',
],
+'config.rdf.tmpl' => [
+ 'escaped_urlbase',
+],
+
);