-
-
Notifications
You must be signed in to change notification settings - Fork 341
Description
Describe the Feature
The release_target_info method attempts to reduce the peak memory footprint of the build, but at the cost of re-invoking the changed method. This isn't free. An option to disable this behavior could make for faster builds when developers are working on machines with plenty of memory.
Required information
Discussed directly with Bill.
-
Version of SCons
3.1.1 -
Version of Python
Python 3.6 -
Which python distribution if applicable (python.org, cygwin, anaconda, macports, brew,etc)
N/A -
How you installed SCons
Vendored into project -
What Platform are you on? (Linux/Windows and which version)
Linux Ubuntu 18.04 -
How to reproduce your issue? Please include a small self contained reproducer. Likely a SConstruct should do for most issues.
Do a no-op build of mongodb and time it. Then makerelease_target_infointo a no-op and retime. You should see that about 30 seconds of wall clock time is saved. -
How you invoke scons (The command line you're using "scons --flags some_arguments")
python3 src/third_party/scons-3.1.1/scons.py --implicit-cache --build-fast-and-loose=on --dbg=on --opt=on --variables-files="/home/andrew/.scons/site_scons/mongo_custom_variables.py" --link-model=static --install-mode=hygienic -j24 CC=/usr/bin/clang-7 CXX=/usr/bin/clang++-7 install-all-meta CCFLAGS=-gsplit-dwarf --cache --debug=time
Additional context
Ideally, this would be controlled by a command line switch, and allow SetOption to configure the value so it can be programmatically changed from within a running SConstruct.
When running with doing the release:
142.63user 2.06system 2:24.66elapsed 100%CPU (0avgtext+0avgdata 824140maxresident)k
Virtual memory: ~12 GB
Peak RSS: ~805 MB
When running without doing the release:
128.64user 2.53system 2:11.16elapsed 100%CPU (0avgtext+0avgdata 843256maxresident)k
Virtual memory: ~12 GB
Peak RSS: 824 MB
It seems to save 20MB of memory but cost 15 seconds (I've seen as much as 30). That doesn't seem like a good trade-off on modern systems. I'm not sure it even does anything in our build.