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.master
parent
971dfdd686
commit
f00ccd0bf6
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue