From: Joey Hess Date: Fri, 2 Oct 2009 19:41:09 +0000 (-0400) Subject: minor optimisation X-Git-Tag: 3.20091017~27^2~132 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=52134dc0ef22d4848ea90042be12175788ac4348;p=ikiwiki.git 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 --- 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;