Skip to content

Commit b31fd4c

Browse files
tom-shantestforstephen
authored andcommitted
Break out of the while loop for better performance (#280)
Now it will cost about 5 seconds in the destroyLaunchFiles function, there should have a break statement if no IOException is caught in each loop iteration for better performance. Signed-off-by: tom-shan <[email protected]>
1 parent 1d8af28 commit b31fd4c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/AbstractDisconnectRequestHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ private void destroyLaunchFiles(IDebugAdapterContext context) {
8181
Files.deleteIfExists(context.getArgsfile());
8282
context.setArgsfile(null);
8383
}
84+
85+
break;
8486
} catch (IOException e) {
8587
// do nothing.
8688
logger.log(Level.WARNING, "Failed to destory launch files, will retry again.");

0 commit comments

Comments
 (0)