big speedup
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 24 Mar 2006 03:21:46 +0000 (03:21 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Fri, 24 Mar 2006 03:21:46 +0000 (03:21 +0000)
IkiWiki/Render.pm

index a981dcb24979da75d8f83923b9d629230a3dc1a2..3fdbc6f4a3dd87f5094f71a70f009deb154f9188 100644 (file)
@@ -463,20 +463,24 @@ FILE:             foreach my $file (@files) {
        # problem is the backlinks could be wrong in the first pass render
        # above
        if (%rendered || @del) {
+               foreach my $f (@files) {
+                       my $p=pagename($f);
+                       if (exists $inlinepages{$p}) {
+                               foreach my $file (keys %rendered, @del) {
+                                       my $page=pagename($file);
+                                       if (globlist_match($page, $inlinepages{$p})) {
+                                               debug("rendering $f, which inlines $page");
+                                               render($f);
+                                               last;
+                                       }
+                               }
+                       }
+               }
+               
                my %linkchanged;
                foreach my $file (keys %rendered, @del) {
                        my $page=pagename($file);
                        
-                       foreach my $f (@files) {
-                               my $p=pagename($f);
-                               if (exists $inlinepages{$p} && 
-                                   globlist_match($page, $inlinepages{$p})) {
-                                       debug("rendering $f, which inlines $page");
-                                       render($f);
-                                       next;
-                               }
-                       }
-                       
                        if (exists $links{$page}) {
                                foreach my $link (map { bestlink($page, $_) } @{$links{$page}}) {
                                        if (length $link &&