Commit 8be0cfd
committed
docs: parallelize man page generation with make -j
The man_pages Bazel action invoked 'make bazel-manpages' serially, running
~10,000 pandoc/nroff invocations one at a time (~177s on a 64-core host).
Split the single make call into two phases: 'preprocess' (serial) generates
the md/man*/*.md sources, then 'cat web' fan out pandoc/nroff in parallel with
-j. They cannot share one -j invocation because cat/web read the md files that
preprocess produces and there is no dependency edge forcing preprocess first.
Running 'cat web' as a second invocation also re-parses the Makefile so its
$(wildcard md/man*/*.md) picks up the freshly generated sources.
Regenerating the full doc set drops from ~177s to ~6s (~30x).
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>1 parent b506257 commit 8be0cfd
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
0 commit comments