-
Notifications
You must be signed in to change notification settings - Fork 39.5k
Completion providers with resolve methods leak memory #74446
Copy link
Copy link
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesVS Code crashing, performance, freeze and memory leak issuesimportantIssue identified as high-priorityIssue identified as high-prioritysuggestIntelliSense, Auto CompleteIntelliSense, Auto CompleteverifiedVerification succeededVerification succeeded
Milestone
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugfreeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuesVS Code crashing, performance, freeze and memory leak issuesimportantIssue identified as high-priorityIssue identified as high-prioritysuggestIntelliSense, Auto CompleteIntelliSense, Auto CompleteverifiedVerification succeededVerification succeeded
Here's a fake completion provider that returns 20k items. Its resolve method does nothing (but exists, so that VS Code thinks it may be used - that seems to be important).
If you register this provider, then repeatedly invoke completion (I found the easiest way to do this was inserting lots of newlines then hitting
Ctrl+SpacethenBackspacerepeatedly), the memory grows continiously and is never reclaimed.I believe this may be what my users are seeing in Dart-Code/Dart-Code#1721 and flutter/flutter#33280 and I saw in #74390. After many the extension host crashes being out of memory.
@jrieken FYI (relates a little to what I was trying to repro with #74418, but did badly because I removed resolve).