Dart extension always spend a lot of memory
See original GitHub issueI have a problem with Dart extension on VSCode. It always spends a lot of memory, until I force quit it. Here is some information for debugs:
- OS: macOS High Sierra v10.13.6
- VS Code: version 1.18.2
- Dart and Flutter extension version: 2.20.0
Provide some images and log from VS Code And it still increases until making my laptop lagged.
Logs:
Sun Nov 04 2018 [16:31:21 GMT+0700 (+07)] Log file started
[16:31:21 GMT+0700 (+07)] [General] [Info] Searching for SDKs...
[16:31:21 GMT+0700 (+07)] [General] [Info] Environment PATH:
[16:31:21 GMT+0700 (+07)] [General] [Info] /Users/tungvn/.fastlane/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/opt/imagemagick@6/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/mongodb/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/bin/yarn/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/flutter/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/mysql/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/sbin
[16:31:21 GMT+0700 (+07)] [General] [Info] /sbin
[16:31:21 GMT+0700 (+07)] [General] [Info] /opt/X11/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] Found Flutter project at /Users/tungvn/Works/VietED/my_app
[16:31:21 GMT+0700 (+07)] [General] [Info] Searching for flutter
[16:31:21 GMT+0700 (+07)] [General] [Info] Looking in:
[16:31:21 GMT+0700 (+07)] [General] [Info] /Users/tungvn/Works/VietED/my_app/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/flutter/bin/
[16:31:21 GMT+0700 (+07)] [General] [Info] /Users/tungvn/.fastlane/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/opt/imagemagick@6/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/mongodb/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/bin/yarn/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/flutter/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/mysql/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/sbin/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /sbin/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /opt/X11/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] Found at /usr/local/flutter/bin/
[16:31:21 GMT+0700 (+07)] [General] [Info] Returning SDK path /usr/local/flutter for flutter
[16:31:21 GMT+0700 (+07)] [General] [Info] Searching for dart
[16:31:21 GMT+0700 (+07)] [General] [Info] Looking in:
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/flutter/bin/cache/dart-sdk/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /Users/tungvn/.fastlane/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/opt/imagemagick@6/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/mongodb/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/bin/yarn/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/flutter/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/mysql/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/sbin/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /sbin/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /opt/X11/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] /usr/local/flutter/bin/cache/dart-sdk/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] Found at /usr/local/flutter/bin/cache/dart-sdk/bin
[16:31:21 GMT+0700 (+07)] [General] [Info] Returning SDK path /usr/local/flutter/bin/cache/dart-sdk for dart
[16:32:20 GMT+0700 (+07)] [General] [Error] This socket has been ended by the other party
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:351:12)
at Analyzer.sendMessage (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/services/stdio_service.js:65:28)
at Analyzer.sendMessage (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/analysis/analyzer.js:110:19)
at Promise (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/services/stdio_service.js:60:18)
at new Promise (<anonymous>)
at Analyzer.sendRequest (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/services/stdio_service.js:49:16)
at Analyzer.analysisGetHover (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/analysis/analyzer_gen.js:297:21)
at Promise (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/providers/dart_hover_provider.js:14:27)
at new Promise (<anonymous>)
at DartHoverProvider.provideHover (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/providers/dart_hover_provider.js:13:16)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:500:127
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:108:368
at new n.Class.derive._oncancel (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:85:776)
at Object.t.asThenable (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:108:333)
at e.provideHover (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:500:86)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:514:826
at e._withAdapter (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js…
[16:32:20 GMT+0700 (+07)] [General] [Error] This socket has been ended by the other party
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:351:12)
at Analyzer.sendMessage (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/services/stdio_service.js:65:28)
at Analyzer.sendMessage (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/analysis/analyzer.js:110:19)
at Promise (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/services/stdio_service.js:60:18)
at new Promise (<anonymous>)
at Analyzer.sendRequest (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/services/stdio_service.js:49:16)
at Analyzer.analysisGetHover (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/analysis/analyzer_gen.js:297:21)
at Promise (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/providers/dart_hover_provider.js:14:27)
at new Promise (<anonymous>)
at DartHoverProvider.provideHover (/Users/tungvn/.vscode/extensions/dart-code.dart-code-2.20.0/out/src/providers/dart_hover_provider.js:13:16)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:500:127
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:108:368
at new n.Class.derive._oncancel (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:85:776)
at Object.t.asThenable (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:108:333)
at e.provideHover (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:500:86)
at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:514:826
at e._withAdapter (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js…
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Dart running using 12 GB of memory - Stack Overflow
I am using 16 GB RAM on my Pc. This started happening while working without any reason as, far as I no. This...
Read more >get | Flutter Package - Pub.dev
No matter what you want to do, there is always an easier way with GetX. ... and save some RAM, with Get you...
Read more >Experimenting with Dart and Wasm - Medium
In this post we discuss our experiments with Wasm and Dart in two forms: 1) Dart ... and exports its memory and a...
Read more >Dart Extensions Methods - FlutterDevs - Hire Flutter Developer
In Wrapper classes object is passed explicitly to the static methods while in extensions it is extended implicitly. So this was basic introduction...
Read more >How To Get Started with Futures and Streams in Dart and Flutter
Flutter extension installed for Visual Studio Code. ... Warning: It's important to always use close() when your widget is removed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@larssn it would be better to raise a new issue since it’s probably not related to the issue above (unless you’re on a very old version of Dart).
When the issue gets bad, please could you:
code --status
from the terminal, and include its outputThanks!
The dart processes should not persist after closing VS Code, though the java ones could because both Gradle and ADB start daemons that will stay around for a while (they’re reused by multiple instances of VS Code or across sessions for performance).
It’s normal to have multiple Dart processes when editing a single project too, because there are multiple Dart applications in use (for example the analysis server, and the flutter device daemon, and if you’re in a debug session, the flutter run daemon).
If you’re seeing more than 3 Dart processes (or more than 2 when not in a debug session) or if they’re persisting after you close VS Code, then that sounds like it could be a bug - if so, please open a new issue and include the a screenshot of the Details page of Task Manager with the Command Line column visible:
Thanks!