* Encode & in diffurl in examples, to conform to pedantic rules.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 4 Jul 2006 16:18:18 +0000 (16:18 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 4 Jul 2006 16:18:18 +0000 (16:18 +0000)
* Speed up RecentChanges by another 40% or so with some memoization.

IkiWiki/CGI.pm
debian/changelog

index 3e4cbe4cf4a97598b42bf03fad16ff54b2269423..424ce2c78493d5ecb21dee5f56787e54b1f23700 100644 (file)
@@ -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",
index 40247ffabc957e6dd746e853d988203e42b4b1b5..d248d2689c6158eb0579e679d55843f9a354e7a6 100644 (file)
@@ -44,9 +44,10 @@ ikiwiki (1.8) UNRELEASED; urgency=low
     about 35% speedup displaying RecentChanges!
   * Make RecentChanges use a table and some CSS, should be much more readable.
     No code changes involved.
-  * Encode & in diffurl in examples, to conform to pedantic rules. 
+  * Encode & in diffurl in examples, to conform to pedantic rules.
+  * Speed up RecentChanges by another 40% or so with some memoization.
 
- -- Joey Hess <joeyh@debian.org>  Tue,  4 Jul 2006 01:42:28 -0400
+ -- Joey Hess <joeyh@debian.org>  Tue,  4 Jul 2006 12:16:39 -0400
 
 ikiwiki (1.7) unstable; urgency=low