trail: Avoid massive slowdown caused by pagetemplate hook when displaying dynamic cgi pages, which cannot use trail anyway.

This seemed to be due to the pagetemplate hook calling prerender. I've
observed this making it take *minutes* for the signin page to be displayed.
ltracing ikiwiki showed it was matching pagespecs a lot.

It may be that this is still a speed pain point when rendering pages, not
just for CGI. So more work may be needed here.
master
Joey Hess 2013-01-24 10:40:35 +11:00
parent 066cabd5a6
commit e5d82ef868
2 changed files with 4 additions and 0 deletions

View File

@ -411,6 +411,8 @@ sub pagetemplate (@) {
my $page = $params{page};
my $template = $params{template};
return unless length $page;
if ($template->query(name => 'trails') && ! $recursive) {
prerender();

2
debian/changelog vendored
View File

@ -10,6 +10,8 @@ ikiwiki (3.20121213) UNRELEASED; urgency=low
are disabled. (smcv)
* poll: Add expandable option to allow users to easily add new choices to
a poll.
* trail: Avoid massive slowdown caused by pagetemplate hook when displaying
dynamic cgi pages, which cannot use trail anyway.
-- Joey Hess <joeyh@debian.org> Sat, 22 Dec 2012 16:15:24 -0400