aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2015-06-09 00:14:57 +0100
committerSimon McVittie <smcv@debian.org>2015-06-09 00:14:57 +0100
commitf00ccd0bf65e2a8d3d0ff4a3960e32c7aeba835a (patch)
treeda3e3fe004ad672d1e167b3f247a710ca2177805 /IkiWiki
parent971dfdd6869c9729d7d52e07af695af54d91b546 (diff)
downloadikiwiki-f00ccd0bf65e2a8d3d0ff4a3960e32c7aeba835a.tar
ikiwiki-f00ccd0bf65e2a8d3d0ff4a3960e32c7aeba835a.tar.gz
In rebuilds, assume that every page has been scanned by the time the scan phase ends
This doesn't prevent memory from being used to track what we have and haven't scanned, but it does make it temporary. This only applies to rebuilds, as a way to avoid breaking the templatebody plugin, unlike the earlier version of this optimization.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 632ec980b..d34e39e8a 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -155,7 +155,7 @@ sub genpage ($$) {
sub scan ($) {
my $file=shift;
- return if $scanned{$file};
+ return if ($config{rebuild} && $phase > PHASE_SCAN) || $scanned{$file};
$scanned{$file}=1;
debug(sprintf(gettext("scanning %s"), $file));
@@ -886,6 +886,10 @@ sub refresh () {
# At this point it becomes OK to start matching pagespecs.
$phase = PHASE_RENDER;
+ # Save some memory in full rebuilds: we no longer need to keep
+ # track of which pages we've scanned, because we can assume the
+ # answer is "all of them".
+ %scanned = () if $config{rebuild};
remove_del(@$del, @$internal_del);