From 87a1d3ff8fb43d219c6f685600a103df43cef4c1 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 4 Jul 2006 16:18:18 +0000 Subject: * Encode & in diffurl in examples, to conform to pedantic rules. * Speed up RecentChanges by another 40% or so with some memoization. --- IkiWiki/CGI.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'IkiWiki') diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 3e4cbe4cf..424ce2c78 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -34,6 +34,13 @@ sub cgi_recentchanges ($) { #{{{ unlockwiki(); + # Optimisation: building recentchanges means calculating lots of + # links. Memoizing htmllink speeds it up a lot (can't be memoized + # during page builds as the return values may change, but they + # won't here.) + eval q{use Memoize}; + memoize("htmllink"); + my $template=template("recentchanges.tmpl"); $template->param( title => "RecentChanges", -- cgit v1.2.3