|
59 | 59 | --build-dir=<dir1> Build directory. |
60 | 60 | --cef-build-dir=<dir2> CEF build directory. By default same |
61 | 61 | as --build-dir. |
62 | | - --ninja-jobs=<jobs> How many CEF jobs to run in parallel. To speed up |
63 | | - building set it to number of cores in your CPU. |
64 | | - By default set to cpu_count / 2. |
| 62 | + --ninja-jobs=<jobs> How many CEF jobs to run in parallel. By default |
| 63 | + sets to CPU threads * 2. If you need to perform |
| 64 | + other tasks on computer and it is slowed down |
| 65 | + by the build then decrease the number of ninja |
| 66 | + jobs. |
65 | 67 | --gyp-generators=<gen> Set GYP_GENERATORS [default: ninja]. |
66 | 68 | --gyp-msvs-version=<v> Set GYP_MSVS_VERSION. |
67 | 69 | --use-system-freetype Use system Freetype library on Linux (Issue #402) |
@@ -213,12 +215,11 @@ def setup_options(docopt_args): |
213 | 215 |
|
214 | 216 | # ninja_jobs |
215 | 217 | # cpu_count() returns number of CPU threads, not CPU cores. |
216 | | - # On i5 with 2 cores and 4 cpu threads the default of 4 ninja |
217 | | - # jobs slows down computer significantly. |
| 218 | + # On i5 with 2 cores there are 4 cpu threads and will enable |
| 219 | + # 8 ninja jobs by default. |
218 | 220 | if not Options.ninja_jobs: |
219 | | - Options.ninja_jobs = int(multiprocessing.cpu_count() / 2) |
220 | | - if Options.ninja_jobs < 1: |
221 | | - Options.ninja_jobs = 1 |
| 221 | + Options.ninja_jobs = int(multiprocessing.cpu_count() * 2) |
| 222 | + assert Options.ninja_jobs > 0 |
222 | 223 | Options.ninja_jobs = str(Options.ninja_jobs) |
223 | 224 |
|
224 | 225 |
|
|
0 commit comments