question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntelliJ is becoming unusable, steadily becoming slower and slower as the project grows.

See original GitHub issue

As 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:closed
  • Created 4 years ago
  • Reactions:28
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
alexander-doroshkocommented, Nov 27, 2019

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:

  • Logs (Help -> Compress Logs And Show In Explorer)
  • CPU snapshot that captures some slow operation. Several CPU snapshots for different slow operations would be even better. E.g. for code completion, local var renaming, just typing with slow highlighting update, etc. Instructions how to capture CPU snapshot are here (see ‘2019.2 and above’ that suggests to use ‘Performance Testing plug-in’, Help -> Start/Stop CPU Usage Profiling).
1reaction
alexander-doroshkocommented, Dec 7, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IDE is steadily becoming slower and slower as the Dart/Flutter ...
As my project grows, IntelliJ is becoming unusable. It's been steadily becoming slower and slower as the project grows. I've been watching this...
Read more >
IntelliJ laggy and slow after Update - Virtually unusable!
IntelliJ laggy and slow after Update - Virtually unusable! · Update to latest version · Disable all marketplace plugins - only bundled Plugins...
Read more >
25% of CPU even when idle. : IDEA-288579
Idea become slow in responses and constantly use ~25% of CPU even when idle. Relates to 1 Similar to 1. Relates to 1...
Read more >
IntelliJ IDEA takes a long time to start. What can be done to ...
To improve startup time, you can disable the antivirus or exclude IDE installation and plugins folders from the antivirus monitor (https:// ...
Read more >
IDEA is very very slow – IDEs Support (IntelliJ Platform)
There could be some customized JVM option you are using that affects the performance or it could be a hundred of other possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found