IntelliJ is becoming unusable, steadily becoming slower and slower as the project grows.
See original GitHub issueAs my project grows, IntelliJ is becoming unusable. It’s been steadily becoming slower and slower as the project grows. I’ve been watching this get worse and worse for months.
I’d say Flutter tooling is really bad in terms of performance for large projects. We have brand new, extremely fast computers, and yet, it halts all the time, all operations are slow. We’re doing simple renames by hand, and stopped using autocomplete, because it just takes 5 seconds or so. Today I turned off inspections, to make it a bit faster. When I open small projects it’s really fast. Yes, our project is big, but when I open much larger Java and Kotlin projects the IDE works just fine. Everything is slow: Code completion, refactoring, importing, renaming, searching usages. This is all not at the same level as Java or Kotlin.
For example, if I search for usages of some method, it shows me the usages of all classes with that method name. For example, if I’m in MyClass and search usages of its method map it will show me usages of all Iterable classes, since all of them have a map method. This makes the search very slow, and it’s never what I want. I want usages of MyClass.map obviously. And it also shows me dynamic variables with that name. Which is also not what I want. I believe the analyzer is being overwhelmed with all this noise, and it gets slow.
In any case, it seems to me the analyzer is just bad. For example, if I try to rename a private variable it should be fast, right? Just a single file to look at. Yet it takes a lot of time, as if it was searching the whole codebase. This issue is similar to https://github.com/flutter/flutter-intellij/issues/4012 but that issue was closed, and the problem still persists. In special this is still true for large projects:
“It’s slow enough that as I edit code, I can watch the syntax highlighting update about once every two to 15 seconds, which is far to slow to be useful. The suggestions dialog takes 3-4 seconds to show up, and another second or two to populate, sometimes showing the little in-menu spinner for ten seconds before showing any information, and sometimes it just gives up after 20 seconds or so with “No Suggestions” when I know for sure that there are valid suggestions to make.”
Also, it may not be just the analyzer. There are also issues when renaming/moving folders with more than 10 files (the number 10 is arbitrary, just a “larger” number of files) either not all references get updated or we’ll get an error saying “Move File Exception - Exception when attempting to compute the file change for the file move: Server error: The edit.getRefactoring request was cancelled.”
Flutter surely is amazing, and you guys rock, but I wish Google would pay more attention to the basics. Makes no sense doing wonderful advanced stuff without first making sure the basics are rock solid. What good is having ML autocomplete, while the simple autocomplete doesn’t work as it should because it’s too slow?
flutter doctor -v
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.17763.864], locale pt-BR)
• Flutter version 1.9.1+hotfix.6 at c:\flutter
• Framework revision 68587a0916 (2 months ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at C:\Users\Marcelo\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.3
• Flutter plugin version 34.0.2
• Dart plugin version 183.6156.11
[√] IntelliJ IDEA Ultimate Edition (version 2019.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2019.1.1
• Flutter plugin version 41.1.4
• Dart plugin version 192.7761
[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:28
- Comments:27 (12 by maintainers)
Top GitHub Comments
Hi @marcglasberg, I’m from JetBrains and I want to help to localize the issue. Yes, it might be caused by a slow Dart Analysis Server, but I also want to make sure it’s not an IntelliJ Platform, Dart plugin or some 3rd party tool. So there are 2 things I’d like to ask for:
Trick that sometimes helps to resolve problems with the Dart Analysis Server: try to close all Dart projects and clear analyzer caches.
Mac/Linux: delete
~./dartServer
folder.Windows: delete
C:\Users\your_name\AppData\Local\.dartServer
folder.