diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 16:20:18 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-04-23 16:20:18 -0400 |
commit | 2f96c49bd1826ecb213ae025ad456a714aa04863 (patch) | |
tree | 3d0c0a7e7f3af0e0105337d197f529eb0fcfd18f /IkiWiki | |
parent | 860a86707856dcffcc67f137a0ab250ab34c42a6 (diff) | |
download | ikiwiki-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')
-rw-r--r-- | IkiWiki/Plugin/pagecount.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index f8881a04b..a561e58e5 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -26,9 +26,7 @@ sub preprocess (@) { # register a dependency. add_depends($params{page}, $params{pages}); - my @pages=keys %pagesources; - @pages=pagespec_match_list(\@pages, $params{pages}, location => $params{page}) - if $params{pages} ne "*"; # optimisation; + my @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page}); return $#pages+1; } |