@@ -24,20 +24,20 @@ public final class StandardGraphLookupView implements GraphLookupView, GraphList
24
24
25
25
static final String INCOMPLETE = "" ;
26
26
27
- /** Map the blockStartNode to its endNode, to accelerate a range of operations */
27
+ /** Map the blockStartNode to its endNode, to accellerate a range of operations */
28
28
HashMap <String , String > blockStartToEnd = new HashMap <>();
29
29
30
30
/** Map a node to its nearest enclosing block */
31
31
HashMap <String , String > nearestEnclosingBlock = new HashMap <>();
32
32
33
- public synchronized void clearCache () {
33
+ public void clearCache () {
34
34
blockStartToEnd .clear ();
35
35
nearestEnclosingBlock .clear ();
36
36
}
37
37
38
38
/** Update with a new node added to the flowgraph */
39
39
@ Override
40
- public synchronized void onNewHead (@ Nonnull FlowNode newHead ) {
40
+ public void onNewHead (@ Nonnull FlowNode newHead ) {
41
41
if (newHead instanceof BlockEndNode ) {
42
42
blockStartToEnd .put (((BlockEndNode )newHead ).getStartNode ().getId (), newHead .getId ());
43
43
String overallEnclosing = nearestEnclosingBlock .get (((BlockEndNode ) newHead ).getStartNode ().getId ());
@@ -87,7 +87,7 @@ public boolean isActive(@Nonnull FlowNode node) {
87
87
}
88
88
89
89
// Do a brute-force scan for the block end matching the start, caching info along the way for future use
90
- synchronized BlockEndNode bruteForceScanForEnd (@ Nonnull BlockStartNode start ) {
90
+ BlockEndNode bruteForceScanForEnd (@ Nonnull BlockStartNode start ) {
91
91
DepthFirstScanner scan = new DepthFirstScanner ();
92
92
scan .setup (start .getExecution ().getCurrentHeads ());
93
93
for (FlowNode f : scan ) {
@@ -112,8 +112,11 @@ synchronized BlockEndNode bruteForceScanForEnd(@Nonnull BlockStartNode start) {
112
112
return null ;
113
113
}
114
114
115
+
116
+
117
+
115
118
/** Do a brute-force scan for the enclosing blocks **/
116
- synchronized BlockStartNode bruteForceScanForEnclosingBlock (@ Nonnull final FlowNode node ) {
119
+ BlockStartNode bruteForceScanForEnclosingBlock (@ Nonnull final FlowNode node ) {
117
120
FlowNode current = node ;
118
121
119
122
while (!(current instanceof FlowStartNode )) { // Hunt back for enclosing blocks, a potentially expensive operation
@@ -154,7 +157,7 @@ synchronized BlockStartNode bruteForceScanForEnclosingBlock(@Nonnull final FlowN
154
157
155
158
@ CheckForNull
156
159
@ Override
157
- public synchronized BlockEndNode getEndNode (@ Nonnull final BlockStartNode startNode ) {
160
+ public BlockEndNode getEndNode (@ Nonnull final BlockStartNode startNode ) {
158
161
159
162
String id = blockStartToEnd .get (startNode .getId ());
160
163
if (id != null ) {
@@ -174,7 +177,7 @@ public synchronized BlockEndNode getEndNode(@Nonnull final BlockStartNode startN
174
177
175
178
@ CheckForNull
176
179
@ Override
177
- public synchronized BlockStartNode findEnclosingBlockStart (@ Nonnull FlowNode node ) {
180
+ public BlockStartNode findEnclosingBlockStart (@ Nonnull FlowNode node ) {
178
181
if (node instanceof FlowStartNode || node instanceof FlowEndNode ) {
179
182
return null ;
180
183
}
0 commit comments