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);