summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/MSCommon/vc.py
diff options
context:
space:
mode:
authorSye van der Veen <syeberman@rogers.com>2014-03-16 19:49:18 (GMT)
committerSye van der Veen <syeberman@rogers.com>2014-03-16 19:49:18 (GMT)
commit6f7255096462195be3ea812b4dcf9dbee6d08ef0 (patch)
treefaa1e3ad1211f028bdbcd3f4239a5395c576c22e /src/engine/SCons/Tool/MSCommon/vc.py
parentbf075e2a9c29b35fe8908d1b91c470c4b2c823a8 (diff)
downloadSCons-6f7255096462195be3ea812b4dcf9dbee6d08ef0.zip
SCons-6f7255096462195be3ea812b4dcf9dbee6d08ef0.tar.gz
SCons-6f7255096462195be3ea812b4dcf9dbee6d08ef0.tar.bz2
Update comments to clarify benefits of script_env memoization
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon/vc.py')
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index b5491b1..72e7c77 100644
--- a/src/engine/SCons/Tool/MSCommon/vc.py
+++ b/src/engine/SCons/Tool/MSCommon/vc.py
@@ -299,9 +299,12 @@ def reset_installed_vcs():
__INSTALLED_VCS_RUN = None
# Running these batch files isn't cheap: most of the time spent in
-# msvs.generate() is due to vcvars*.bat. In a build that keeps separate
-# environments for debug and release, or perhaps builds against multiple
-# MSVS versions at once, we can save a lot of time by caching the output.
+# msvs.generate() is due to vcvars*.bat. In a build that uses "tools='msvs'"
+# in multiple environments, for example:
+# env1 = Environment(tools='msvs')
+# env2 = Environment(tools='msvs')
+# we can greatly improve the speed of the second and subsequent Environment
+# (or Clone) calls by memoizing the environment variables set by vcvars*.bat.
script_env_stdout_cache = {}
def script_env(script, args=None):
cache_key = (script, args)