summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/CHANGES.txt2
-rw-r--r--src/engine/SCons/Taskmaster.py6
-rw-r--r--test/LINK/applelink.py18
3 files changed, 18 insertions, 8 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 47b63ee..c837157 100755
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -46,6 +46,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Improved threading performance by ensuring NodeInfo is shared
across threads. Results in ~13% improvement for parallel builds
(-j# > 1) with many shared nodes.
+ - Improved DAG walk performance by reducing unnecessary work when
+ there are no un-visited children.
From Mats Wichmann
- Replace instances of string find method with "in" checks where
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index 4892026..06fc94c 100644
--- a/src/engine/SCons/Taskmaster.py
+++ b/src/engine/SCons/Taskmaster.py
@@ -874,8 +874,10 @@ class Taskmaster(object):
# These nodes have not even been visited yet. Add
# them to the list so that on some next pass we can
# take a stab at evaluating them (or their children).
- children_not_visited.reverse()
- self.candidates.extend(self.order(children_not_visited))
+ if children_not_visited:
+ if len(children_not_visited) > 1:
+ children_not_visited.reverse()
+ self.candidates.extend(self.order(children_not_visited))
# if T and children_not_visited:
# T.write(self.trace_message(' adding to candidates: %s' % map(str, children_not_visited)))
diff --git a/test/LINK/applelink.py b/test/LINK/applelink.py
index 86e0a4c..e1b2837 100644
--- a/test/LINK/applelink.py
+++ b/test/LINK/applelink.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import sys
+import re
import TestSCons
@@ -83,10 +84,14 @@ for SHLIBVERSION, APPLELINK_CURRENT_VERSION, APPLELINK_COMPATIBILITY_VERSION, sh
# libfoo.1.2.3.dylib:
# > libfoo.1.2.3.dylib (compatibility version 1.1.99, current version 9.9.9)
# > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
- otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n".format(
- **locals())
+ # otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n".format(
+ # **locals())
+ otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version REPLACEME)\n".format(**locals())
+ otool_output = re.escape(otool_output)
+ otool_output = otool_output.replace('REPLACEME','\d+\.\d+\.\d+')
+
- test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output)
+ test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output, match=TestSCons.match_re_dotall)
# Now test that None in APPLELINK_CURRENT_VERSION or APPLELINK_COMPATIBILITY_VERSION will skip
# generating their relevant linker command line flag.
@@ -135,15 +140,16 @@ for SHLIBVERSION, \
# We expect output such as this
# libfoo.1.2.3.dylib:
# > libfoo.1.2.3.dylib (compatibility version 1.1.99, current version 9.9.9)
- # > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
+ # > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version #.#.#)
if APPLELINK_NO_CURRENT_VERSION:
APPLELINK_CURRENT_VERSION = '0.0.0'
if APPLELINK_NO_COMPATIBILITY_VERSION:
APPLELINK_COMPATIBILITY_VERSION = '0.0.0'
- otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n".format(
+ otool_output = "libfoo.{SHLIBVERSION}.dylib:\n\tlibfoo.{SHLIBVERSION}.dylib (compatibility version {APPLELINK_COMPATIBILITY_VERSION}, current version {APPLELINK_CURRENT_VERSION})\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version REPLACEME)\n".format(
**locals())
+ otool_output = re.escape(otool_output).replace('REPLACEME','\d+\.\d+\.\d+')
- test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output)
+ test.run(program='/usr/bin/otool', arguments='-L libfoo.%s.dylib' % SHLIBVERSION, stdout=otool_output, match=TestSCons.match_re_dotall)
test.pass_test()