Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ language: python
notifications:
irc: "chat.freenode.net#pil"

env: MAX_CONCURRENCY=4

# Run slow PyPy* first, to give them a headstart and reduce waiting time.
# Run latest 3.x and 2.x next, to get quick compatibility results.
# Then run the remainder.
Expand Down
8 changes: 3 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,9 @@ Build Options
-------------

* Environment Variable: ``MAX_CONCURRENCY=n``. By default, Pillow will
use multiprocessing to build the extension in parallel. This may not
be ideal for machines that report a large number of cores compared
to the actual processor power. Set ``MAX_CONCURRENCY`` to 1 to disable
parallel building, or to a larger number to limit to that number of
parallel tasks.
use multiprocessing to build the extension on all available CPU,
but not more than 4. Setting ``MAX_CONCURRENCY`` to 1 will disable
parallel building.

* Build flags: ``--disable-zlib``, ``--disable-jpeg``,
``--disable-tiff``, ``--disable-freetype``, ``--disable-tcl``,
Expand Down
4 changes: 2 additions & 2 deletions mp_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import os, sys

try:
MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', cpu_count()))
except:
MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', min(4, cpu_count())))
except NotImplementedError:
MAX_PROCS = None


Expand Down