summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch
diff options
context:
space:
mode:
authorDavHau <hsngrmpf+github@gmail.com>2025-06-05 23:53:29 +0700
committerDavHau <hsngrmpf+github@gmail.com>2025-06-06 00:25:51 +0700
commit4d12b83ae0437ad26bd0158178eadfac1c608c2d (patch)
treeb358aee8e18584c491142d8fafb7e6a9380ed7bb /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch
parent437ad124ac972ba5ae75948c9f7a429d3138cf2d (diff)
parallelRun, parallelMap: init
These bash helpers make it trivial to write shell based setup hooks that utilize all cores. This also makes it simpler to optimize existing hooks which are not yet utilizing all cores. Existing hooks which already use `xargs -P` to parallelize their work, can be optimized further by replacing the xargs call with one of the functions added here , eg. `parallelRun` or `parallelMap`. The new shell based functions `parallelRun` and `parallelMap` are superior to `xargs -P`, because: - They perform better as they launch $NIX_BUILD_CORE workers, each handling many jobs, vs `xargss -P` usually launches a new process for each job (anything else is difficult to implement nicely with xargs). - workers can be defined as shell functions, which allows using all declared shell variables and functions inside the worker (e.g isElf or isScript, etc.), vs. `xargs -P` forces the user to create a new shell process, which cannot re-use declared variables and functions.
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions