Describe the bug
The analysis server keeps "analyzing" visible in vscode as a notification, and in the text below (screenshot) there is a 94% cpu usage
To Reproduce
Steps to reproduce the behavior:
Screenshots
CPU % Mem MB PID Process
1 98 903 code main
5 82 908 gpu-process
0 16 910 utility
3 279 912 window (create_tweet_bloc.dart — Osprey)
0 0 917 /usr/local/bin/fish -l
0 0 3655 bash /usr/local/bin/code --status
14 33 3665 electron_node cli.js
43 1163 922 extensionHost
94 1049 936 /Users/nikolaj/Dev/sources/flutter/bin/cache/dart-sdk/bin/dart /Users/nikolaj/Dev/sources/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --client-id=VS-Code --client-version=3.15.1
Versions (please complete the following information):
Facing the same issue. Even small changes are causing the analyser to run and run for very long time. I have attached screen shot for reference.

Adding the following to Settings.json helped me:
"dart.previewLsp": true.
Adding the following to Settings.json helped me:
"dart.previewLsp": true.
I have applied the changes you have suggested and for past 15 minutes I was working on my flutter project with applied changes I no longer see my analyser going crazy. I works very well. Care to share what this change actually does?
dart.previewLsp switches communication between VS Code and the Dart Language Server from a proprietary protocol to the Language Server Protocol.
Mostly this should make no difference to users, as it's just an internal API being migrated, however it comes with some performance improvements because:
The issues probably can be solved in the original protocol, but since the goal is to fully migrate to LSP fairly soon anyway (and remove the old protocol code) my recommendation for anyone with perf issues is to just switch to LSP early.
Since it seems like LSP has improved performance for both of you, I'm going to close this. Please let me know if you do see issues with LSP enabled in future though!
Since it seems like LSP has improved performance for both of you, I'm going to close this. Please let me know if you do see issues with LSP enabled in future though!
Thank you for taking your time to reply in such a elaborate manner.
I still have this problem. it's really annoying
@easazade if you're having issues and there are no open issues covering your problem, please file a new issue. It's hard to track problems tagged onto the end of closed issues. Thanks!