summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2009-08-27 23:30:41 +0100
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2009-08-28 15:34:35 +0100
commitd92f767fb772c9b11293134bd67bc1261aea8f1e (patch)
tree80231ac01765b5b993eb8695cfeae74a584a977b /IkiWiki
parent8b927d4a6565125bc09d18d9e971f804d1e44e0a (diff)
inline: if using pagenames, don't add a dependency on "page1 or page2 or..."
This is unnecessary and just slows us down (by a factor of 2, in the pessimal case where every page has an inline with pagenames); it's also not possible to optimize it into add_depends_exact calls.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/inline.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index a501566b5..d5ad11d43 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -195,10 +195,10 @@ sub preprocess_inline (@) {
@list = map { bestlink($params{page}, $_) }
split ' ', $params{pagenames};
-
- $params{pages} = join(" or ", @list);
}
else {
+ add_depends($params{page}, $params{pages});
+
@list = pagespec_match_list(
[ grep { $_ ne $params{page} } keys %pagesources ],
$params{pages}, location => $params{page});
@@ -247,7 +247,6 @@ sub preprocess_inline (@) {
@list=@list[0..$params{show} - 1];
}
- add_depends($params{page}, $params{pages});
# Explicitly add all currently displayed pages as dependencies, so
# that if they are removed or otherwise changed, the inline will be
# sure to be updated.