# Optimisation.
use Memoize;
memoize("abs2rel");
+memoize("pagespec_translate");
use vars qw{%config %links %oldlinks %oldpagemtime %pagectime
%renderedfiles %pagesources %depends %hooks %forcerebuild};
return "($a) or ($b)";
} #}}}
-sub pagespec_match ($$) { #{{{
- my $page=shift;
+sub pagespec_translate ($) { #{{{
+ # This assumes that $page is in scope in the function
+ # that evalulates the translated pagespec code.
my $spec=shift;
# Support for old-style GlobLists.
}
}
- return eval $code;
+ return $code;
+} #}}}
+
+sub pagespec_match ($$) { #{{{
+ my $page=shift;
+ my $spec=shift;
+
+ return eval pagespec_translate($spec);
} #}}}
sub match_glob ($$) { #{{{
+ikiwiki (1.14) UNRELEASED; urgency=low
+
+ * Memoize pagespec translation, this speeds up a build of the ikiwiki tree
+ by 10% or so.
+
+ -- Joey Hess <joeyh@debian.org> Tue, 1 Aug 2006 23:35:13 -0400
+
ikiwiki (1.13) unstable; urgency=low
* ikiwiki can now download and aggregate feeds with its new aggregate