summary refs log tree commit diff
path: root/nixos/lib/make-options-doc
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2023-02-13 13:43:32 +0100
committerpennae <82953136+pennae@users.noreply.github.com>2023-02-18 13:17:57 +0100
commit81cf17325659b5f4526fa0d50ac7b403558106a3 (patch)
treeb2875af82387756ec34e442dcd481fa3b710000b /nixos/lib/make-options-doc
parent5f4e07deb7c44f27d498f8df9c5f34750acf52d2 (diff)
downloadnixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.tar
nixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.tar.gz
nixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.tar.bz2
nixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.tar.lz
nixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.tar.xz
nixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.tar.zst
nixpkgs-81cf17325659b5f4526fa0d50ac7b403558106a3.zip
nixos-render-docs: use multiprocessing for options
options processing is pretty slow right now, mostly because the
markdown-it-py parser is pure python (and with performance
pessimizations at that). options parsing *is* embarassingly parallel
though, so we can just fork out all the work to worker processes and
collect the results.

multiprocessing probably has a greater benefit on linux than on darwin
since the worker spawning method darwin uses is less efficient than
fork() on linux. this hasn't been tested on darwin, only on linux, but
if anything darwin will be faster with its preferred method.
Diffstat (limited to 'nixos/lib/make-options-doc')
-rw-r--r--nixos/lib/make-options-doc/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix
index 09b0191d2bb..50fb9ede08d 100644
--- a/nixos/lib/make-options-doc/default.nix
+++ b/nixos/lib/make-options-doc/default.nix
@@ -152,7 +152,7 @@ in rec {
       pkgs.nixos-render-docs
     ];
   } ''
-    nixos-render-docs options docbook \
+    nixos-render-docs -j $NIX_BUILD_CORES options docbook \
       --manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \
       --revision ${lib.escapeShellArg revision} \
       --document-type ${lib.escapeShellArg documentType} \