Debug adapter consumes CPU when large messages are printed #2877
Copy link
Copy link
Closed
Labels
importantSomething important!Something important!in debuggingRelates to the debug adapter or process of running debug sessionsRelates to the debug adapter or process of running debug sessionsis bugis performance
Milestone
Description
Adding:
print('A' * 5000);To a Fluter project and then running it causes a hang (around 45 seconds on my machine) for the print. Larger messages take many minutes.
The time is being spent in looking for stack frames:
const frame = this.getStackFrameData(message) || this.getWebStackFrameData(message) || this.getMessageWithUriData(message);These regexes were modified in the latest release, so it's likely those changes have caused this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
importantSomething important!Something important!in debuggingRelates to the debug adapter or process of running debug sessionsRelates to the debug adapter or process of running debug sessionsis bugis performance
Activity
Redo stack frame parsing to avoid catastrophic backtracking
Don't try to parse stack frames from large messages
Redo stack frame parsing to avoid catastrophic backtracking
Don't try to parse stack frames from large messages