Description
Dart & Flutter has suddenly become unusable slow in VSCode. Intellisense won't load within 30+ seconds, syntax highlighting won't update, jumping to code definitions loads infinitely, etc.
This seems to be especially the case on bigger projects, on a newly created project it works fine. I tried switching to Android Studio which seems to behave similarly (maybe a little better).
I tried uninstalling all extensions, even completely removing VSCode with any data stored and reinstalling it. As soon as I install the Dart extension, it is unusable. I also tried setting the following settings:
"dart.previewLsp": true,
"dart.useLegacyAnalyzerProtocol": true,
"dart.useLsp": false,
"dart.autoImportCompletions": false,
I'm on macOS 14.4, VSCode Version 1.87.2 (Universal),
In the Activity Monitor, there is the dart:analysis_server.dart.snapshot
process running with around 1 GB of used memory. I'm not sure if this is normal.
Here is a screenshot from the Dart Analyzer (which I'm also having trouble opening)
dart info
output:
General info
- Dart 3.3.2 (stable) (Tue Mar 19 20:44:48 2024 +0000) on "macos_arm64"
- on macos / Version 14.4 (Build 23E214)
Project info
- sdk constraint: '>=2.17.0 <3.0.0'
Process info
Memory | CPU | Elapsed time | Command line |
---|---|---|---|
6 MB | 0.0% | 11:53 | dart devtools --machine --allow-embedding |
393 MB | 100.6% | 11:53 | dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.85.20240318 |
29 MB | 0.0% | 11:53 | flutter_tools.snapshot daemon |
35 MB | 0.1% | 00:23 | flutter_tools.snapshot debug_adapter |
121 MB | 10.8% | 00:23 | flutter_tools.snapshot run --machine --start-paused -d B95DD896-131D-4163-A83C-1AC8A70E8560 --devtools-server-address http:/ --target /main.dart --web-renderer canvaskit --web-port 5000 |
Any recommendations on how I could possible fix this would be very welcome!