From 52134dc0ef22d4848ea90042be12175788ac4348 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Oct 2009 15:41:09 -0400 Subject: [PATCH] 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 --- IkiWiki/Render.pm | 1 + 1 file changed, 1 insertion(+) 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; -- 2.26.2