-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Analyzer] Analyzer extremely slow #43943
Comments
I am having the same issue in WebStorm with Dart (w/o Flutter). I'm getting the same analyzer response times as described above. I suspected the WebStorm Dart plugin might not work well yet with dart v2.10 -- my issue seems almost exactly the same as above. On my small projects its fine, on large projects, Analyzer is not fine. I tried to set it up so I can get observatory running on the analyzer to peek at it, but I can't get dart v2.10.2 analyzer to start (which I guess is a separate issue, hasn't worked since the new combined Dart tool came out). |
Having the same problem with Android studio, it seems like some kind of extreme memory leak problem. Any news on this issue? |
I am also having this issue in VSCode. It seems to be way worse in projects where there I have documented a lot of the code with triple-slash comments. I have to wait many seconds every time I write any new code for the analyzer. |
Just chiming back in that this is still an issue with out of memory warnings / crashes in android studio in the most recent stable flutter version.
This was caused by OSX intercepting ctrl-space as a default keybind to cycle through input sources. Flutter doctor
Dart plugin version: 201.9317 |
I am also having this issue both in Android Studio and VSCode. Temporarily solved the issue by increasing the Android Studio's custom VM options to |
Same issue in Android Studio after upgrading to Flutter 2 |
Bug still exists in Flutter (Channel stable, 2.0.6, on macOS 11.1 20C69 darwin-x64, locale en-PH) |
hello any news on this problem ? exemple: 2 I open my Main (which has only a few lines) 3 I put the two windows next to each other. 4 I repeat action 1 I don't understand we have 10 pc in the office and they all have the same problem. |
Any updates on issues related to analyzer performance? Performance is very degrading and sometimes hangs causing me to have to restart and wait for the analyzer to re-analyze the entire project. Bigger projects crossing 50K LOC take a considerable amount of time to analyze. |
I think my case is rare, but removing the dart_code_metrics package helped me. it is a plugin for the dart linter and for some reason slows down the analyzer a lot, especially in the monorepo |
At least part of the performance issues appears to be the number of analysis contexts that are created in order to perform analysis. We are actively working on two independent but related changes that should help reduce the number of contexts that get created. (You can think of an analysis context as a region of the file system in which every For example, we currently create a new context whenever the code needs to be analyzed with a different The first change will make it possible to use a single context to analyze a whole package even when there are multiple analysis options files in the package. The hope is that this will help some users, but it is also a necessary step to allow the second change. The second change is to add support to both the analyzer and to pub to better support the notion of a monorepo. The expectation is that this will allow us to create a single context for the entire monorepo, which ought to significantly improve the performance for projects that are using monorepos. |
Looking forward to seeing improvements. |
This is a known issue with the plugins and affects all plugins. If you still want to use DCM, consider trying the standalone version (not the package) as it doesn't have this issue. |
What I really love about Dart is the DX. The Dart and Flutter community knows this so well that they develop packages with this mental pattern. Fast static analysis is necessary and must be a priority for Dart. |
@saltedpotatos what is your current experience with analyzer performance? (if you are still writing Dart code). |
Hi @mraleph I currently have no complaints with the analyzer performance. (and am still writing Dart code). As an aside, I also enjoyed watching the talk you gave at Flutter & Friends '24 |
Thanks! I am going to close this issue then. If you start experiencing some issues with analyzer again - please don't hesitate to file another issue. PS. Happy you liked the talk. |
Dart Analyzer performance has really dropped for me recently, in Android Studio and in VS Code.
I am also seeing Android Studio run out of memory and crash, which I think is related, but could be wrong.
In order to have the analyzer pickup a change in a generated file, I have to restart the analysis server.
Looking at analysis diagnostics, across 2200 requests over 28 minutes, my average latency is 641ms, my maximum is 3,446ms, and 54% are greater than 150ms.
If this is better filed elsewhere, please let me know.
I have
Dart SDK Version (
dart --version
) : Dart SDK version: 2.10.2 (stable) (Tue Oct 13 15:50:27 2020 +0200) on "macos_x64"Whether you are using Windows, MacOSX, or Linux (if applicable) : OSX
Analysis_options
Flutter doctor -v
I believe not seeing plugins in AS is a bug at the moment. It does see them on the master branch.
Pubspec dependencies
Android Studio idea.log excerpt
Thanks!
The text was updated successfully, but these errors were encountered: