diff options
| author | Moritz Wundke | 2014-03-07 20:20:06 +0100 |
|---|---|---|
| committer | Moritz Wundke | 2014-03-07 20:20:06 +0100 |
| commit | 12a3989cd7b645f271c8b297a09cb0a4a7d8d2d4 (patch) | |
| tree | f3b3061a171633e44645ef405db51f84cc201eef /SConstruct | |
| parent | 76b1d421f6ddbe8856b40dcec8fc468e6dc043d6 (diff) | |
| download | godot-12a3989cd7b645f271c8b297a09cb0a4a7d8d2d4.tar.gz godot-12a3989cd7b645f271c8b297a09cb0a4a7d8d2d4.tar.zst godot-12a3989cd7b645f271c8b297a09cb0a4a7d8d2d4.zip | |
Speed build time up by 6 using multiple jobs
Adding aggresive build mode that spawns num_core+1 jobs. This speeds up
build time by 6. On my 8 core machine I'm down from 6m:16s to 1m:34s.
Diffstat (limited to '')
| -rw-r--r-- | SConstruct | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index ed65f2b89..1b4ee5ab9 100644 --- a/SConstruct +++ b/SConstruct @@ -6,6 +6,13 @@ import os.path import glob import sys import methods +import multiprocessing + +# Enable aggresive compile mode if building on amulti core box +if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes': + NUM_JOBS = multiprocessing.cpu_count() + if NUM_JOBS > 1: + SetOption('num_jobs', multiprocessing.cpu_count()+1) methods.update_version() |
