summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-02 15:41:09 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-02 15:41:09 -0400
commit52134dc0ef22d4848ea90042be12175788ac4348 (patch)
tree3757e5a94f20af49b0834cea1e07942b074e3474
parent71eabd44d5749ec5000e4f32c8dfc19a16aef297 (diff)
minor optimisation
As soon as a change happens, we know we will need to rescan all dependencies from the start, so bail out of the current scan partway to avoid doing redundant work. Only problem with this is that ikiwiki sometimes ends up printing out dependencies that, while correct, are not obvious. Before: building B, which depends on A building C, which depends on A building D, which depends on A After: building B, which depends on A building C, which depends on B building D, which depends on C
-rw-r--r--IkiWiki/Render.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index c58f33d68..09b646f75 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -501,6 +501,7 @@ sub refresh () {
render($f);
$rendered{$f}=1;
$changes++;
+ last;
}
}
} while $changes;