Skip to content

Commit 00e2bca

Browse files
Mathew Robinsonevergreen
authored andcommitted
SERVER-42264 Improve SCons performance
1 parent 30f39cc commit 00e2bca

File tree

1 file changed

+4
-4
lines changed
  • src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node

1 file changed

+4
-4
lines changed

src/third_party/scons-3.1.1/scons-local-3.1.1/SCons/Node/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ def __init__(self):
614614
self._func_rexists = 1
615615
self._func_get_contents = 0
616616
self._func_target_from_source = 0
617+
self.ninfo = None
617618

618619
self.clear_memoized_values()
619620

@@ -1131,11 +1132,10 @@ def new_ninfo(self):
11311132
return ninfo
11321133

11331134
def get_ninfo(self):
1134-
try:
1135-
return self.ninfo
1136-
except AttributeError:
1137-
self.ninfo = self.new_ninfo()
1135+
if self.ninfo is not None:
11381136
return self.ninfo
1137+
self.ninfo = self.new_ninfo()
1138+
return self.ninfo
11391139

11401140
def new_binfo(self):
11411141
binfo = self.BuildInfo()

0 commit comments

Comments
 (0)