aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-04-23 16:20:18 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-04-23 16:20:18 -0400
commit2f96c49bd1826ecb213ae025ad456a714aa04863 (patch)
tree3d0c0a7e7f3af0e0105337d197f529eb0fcfd18f /IkiWiki.pm
parent860a86707856dcffcc67f137a0ab250ab34c42a6 (diff)
downloadikiwiki-2f96c49bd1826ecb213ae025ad456a714aa04863.tar
ikiwiki-2f96c49bd1826ecb213ae025ad456a714aa04863.tar.gz
pagespec_match_list * optimisation
Add an optimisation for the semi-common case of a "*" pagespec. Can avoid doing any real processing in this case.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index e260fffea..e8c0c7abc 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1837,6 +1837,8 @@ sub pagespec_match_list ($$;@) {
my $spec=shift;
my @params=@_;
+ return @$pages if $spec eq '*'; # optimisation
+
my $sub=pagespec_translate($spec);
error "syntax error in pagespec \"$spec\""
if $@ || ! defined $sub;