Created
June 16, 2016 02:33
-
-
Save MasterDuke17/d06f051a8033e499599d05426ef33d52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/htmlify.p6 b/htmlify.p6 | |
index 0a737a1..1edb598 100755 | |
--- a/htmlify.p6 | |
+++ b/htmlify.p6 | |
@@ -192,11 +192,19 @@ sub process-pod-dir($dir, :&sorted-by = &[cmp], :$sparse) { | |
say "Processing $dir Pod files ..."; | |
my $total = +@pod-sources; | |
my $kind = $dir.lc; | |
+ my @pod-files; | |
for @pod-sources.kv -> $num, (:key($filename), :value($file)) { | |
- printf "% 4d/%d: % -40s => %s\n", $num+1, $total, $file.path, "$kind/$filename"; | |
- my $pod = extract-pod($file.path); | |
- process-pod-source :$kind, :$pod, :$filename, :pod-is-complete; | |
+ push @pod-files, start { | |
+ printf "% 4d/%d: % -40s => %s\n", $num+1, $total, $file.path, "$kind/$filename"; | |
+ my $pod = extract-pod($file.path); | |
+ process-pod-source :$kind, :$pod, :$filename, :pod-is-complete; | |
+ } | |
+ if $num %% 10 { | |
+ await(Promise.allof(@pod-files)); | |
+ @pod-files = (); | |
+ } | |
} | |
+ await(Promise.allof(@pod-files)); | |
} | |
sub process-pod-source(:$kind, :$pod, :$filename, :$pod-is-complete) { | |
@@ -576,12 +584,16 @@ sub write-type-graph-images(:$force) { | |
} | |
} | |
say 'Writing type graph images to html/images/ ...'; | |
+ my @type-graph-images; | |
for $type-graph.sorted -> $type { | |
- my $viz = Perl6::TypeGraph::Viz.new-for-type($type); | |
- $viz.to-file("html/images/type-graph-{$type}.svg", format => 'svg'); | |
- $viz.to-file("html/images/type-graph-{$type}.png", format => 'png', size => '8,3'); | |
- print '.'; | |
+ push @type-graph-images, start { | |
+ my $viz = Perl6::TypeGraph::Viz.new-for-type($type); | |
+ $viz.to-file("html/images/type-graph-{$type}.svg", format => 'svg'); | |
+ $viz.to-file("html/images/type-graph-{$type}.png", format => 'png', size => '8,3'); | |
+ print '.'; | |
+ } | |
} | |
+ await(Promise.allof(@type-graph-images)); | |
say ''; | |
say 'Writing specialized visualizations to html/images/ ...'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment