intellij w dart plugin now unusable for anything but the smallest projects

257 views
Skip to first unread message

Anders Holmgren

unread,
Mar 20, 2016, 12:51:18 PM3/20/16
to Dart plugin for JetBrains Editors
I've noticed over the past months as performance has steadily degraded for me.

Now with the latest intellij 2016 rc, latest dart plugin, latest dart dev sdk it is completely unusable.

I type a few chars then it hangs for several seconds. Autocomplete is a thing of the past. It is actually a lot less useful than a simple text editor.

I've noticed this on two separate collections of projects. The most recent one only has 5 different projects, none of which are very big.

I am using strong mode with generic methods. Not sure if that is the cause.

I might try atom to see if that has the same problems.

Is anyone else experiencing this?

Günter Zöchbauer

unread,
Mar 20, 2016, 4:27:20 PM3/20/16
to Dart plugin for JetBrains Editors
I switched to a new machine recently because I wasn't able to do any work anymore - just watching WebStorm reindexing or the analyzer analyzing and one waiting for the other to complete. 
It's working fine so far on the new machine though.
The previous computer was quite dated (2010), but had 12GB i7 quad-core and a not so old SSD.

Alexander Doroshko

unread,
Mar 21, 2016, 5:54:36 AM3/21/16
to jetbrains-dart...@dartlang.org
Hi Anders, Günter,

I wish you reported your issues earlier. There are no known major performance issues, neither in WebStorm / IntelliJ IDEA, nor in Analysis Server from the Dart SDK, so new major releases of SDK and IDEs have been shipped.


WebStorm reindexing or the analyzer analyzing and one waiting for the other to complete.

There's no direct relation between WebStorm's indexing and 'Dart Analysis...' progress. Those are separate processes that do not wait for each other. Let me clarify how it works and check if it is not the case in your environment.


IDE's indexing
starts when:
  • New project created or IDE has been updated (one-time indexing)
  • A lot of new files appear or change in project (for example git branch switch)
  • Project roots change (for example SDK changed or 'pub upgrade'

Indexing should be fast (for example on SDK switch it takes just a few seconds to index new Dart SDK).
In other cases indexing should not start and definitely should not take much time. Reindexing should not happen on project reopening. If it is not the case for you please describe the use case and see instructions below. Issues with indexing are handled by JetBrains.


'Dart Analysis...' progress
shows status of the Dart Analysis Server that is a part of the Dart SDK. It doesn't save caches, so full analysis is redone each time when you reopen your project. It shouldn't take ages on project opening, and shouldn't take any significant time while you work with project (after initial analysis completion). Issues with Analysis Server are handled by the Google Dart team.


First steps that can help to track down performance issues in the IDE. Issues can be reported to YouTrack.

1. More details on what is slow and how is it slow and also overview of the project structure (ideally - a sample project to reproduce).
2. IDE logs and thread dumps (Help | Show Log, thread dumps are also there)
3. CPU snapshot, see instructions.


To track down issues with Analysis Server you can do the following (issues can be reported to https://github.com/dart-lang/sdk/issues):

In the IDE click Help | Find Action, type 'Registry', open it, find 'dart.server.additional.arguments' registry option and include something like this there:
--instrumentation-log-file=/Users/some/path/das_log.txt

Note that this log will contain the content of every file read by the server, the file paths of those files, and possibly other sensitive data. You should not send this file if you’ve been working on confidential or proprietary code. Instead, we would encourage you to try to reproduce your problem using an open source code base and then send us the log from that session.

If you do choose to send us a log file containing confidential code, please send it to a team member directly. Do not attach it to an issue in the Github issue tracker or a posting to a public forum.

Because these files can become quite large, the server will periodically break the file into smaller pieces (by appending a digit to the end of the file name). It will only keep the last 10 files, but it might be useful for us to get more than one of the files that were written.

Regards,
Alex

Anders Holmgren

unread,
Mar 21, 2016, 10:09:40 AM3/21/16
to Günter Zöchbauer, Dart plugin for JetBrains Editors
Hmm this is with a pretty recent Mac book pro w a 512gb ssd so doubt that is my problem
--
You received this message because you are subscribed to the Google Groups "Dart plugin for JetBrains Editors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jetbrains-dart-plugi...@dartlang.org.

Konstantin Shcheglov

unread,
Mar 22, 2016, 12:00:53 PM3/22/16
to Anders Holmgren, Günter Zöchbauer, Dart plugin for JetBrains Editors

  If you edit largish files, e.g. more than 1000 of lines, it might take some time for IDEA to parse it.
  Unfortunately some of these parse operations are done on the event thread and the user feels this as hanging.
--
Konstantin Scheglov
Software Engineer
Google, Inc.

Anders Holmgren

unread,
Mar 22, 2016, 4:14:59 PM3/22/16
to Konstantin Shcheglov, Günter Zöchbauer, Dart plugin for JetBrains Editors
I'll provide more info on the weekend.

These are not large files so doubt it relates to that.

I'm pretty confident that the analysis time has grown longer over the past months at least for strong mode.

I'd be surprised if the ide freezing doesn't relate in some way to that even though there is often nothing displayed in the status bar

Jaime Wren

unread,
Mar 24, 2016, 12:42:38 AM3/24/16
to Anders Holmgren, Konstantin Shcheglov, Günter Zöchbauer, Dart plugin for JetBrains Editors, Vijay Menon
+Vijay
- Jaime

Tomasz Kubacki

unread,
Mar 24, 2016, 9:07:04 AM3/24/16
to Dart plugin for JetBrains Editors
my 2 cents - I've 20K LOC proj and it seems to run reasonably ok - but sometimes suddenly analysis just dies and restarting analysis server doesn't help (need to restart intellij)

Alexander Doroshko

unread,
Mar 24, 2016, 9:18:45 AM3/24/16
to jetbrains-dart...@dartlang.org
Tomasz,

Feel free to file a bug report in YouTrack with details (what does 'analysis dies' mean?), screenshots (if applicable) and logs (Help | Show Log).

Alex
--

Leaf Petersen

unread,
Mar 24, 2016, 1:52:52 PM3/24/16
to Vijay Menon, Jaime Wren, Anders Holmgren, Konstantin Shcheglov, Günter Zöchbauer, Dart plugin for JetBrains Editors
I'm not sure what's going on here.  I have been using Intellij IDEA 15.0.4 on linux on a largish (253kloc excluding package dependencies) internal project on Linux, using a bleeding edge build of analyzer, and editing is not affected at all, and code completion is close enough to instantaneous.  Strong mode analysis takes a minute or so on start up, but incremental edits re-analyze within seconds.

I only have a single content root, possibly relevant?  I also only have one project open at a time, possibly also relevant?

If there's an easy way for me to open up the code base in question, I'm happy to give it a try and see if I can reproduce.

Using the analysis server's status interface might provide some useful data about where time is going in the analyzer.

-leaf



On Thu, Mar 24, 2016 at 6:29 AM, Vijay Menon <v...@google.com> wrote:
[+leafp]

Leaf has looked into some of perf issues with strong mode.

Anders Holmgren

unread,
Mar 24, 2016, 11:14:41 PM3/24/16
to Leaf Petersen, Vijay Menon, Jaime Wren, Konstantin Shcheglov, Günter Zöchbauer, Dart plugin for JetBrains Editors
I've created an issue https://youtrack.jetbrains.com/issue/WEB-20996. This includes steps for checking out the code I was working on when I hit the issue, which I've also copied below

Interestingly, after following these steps myself today, I am not seeing the freezing yet in the new workspace. Admittedly I haven't done much editing, but it could suggest the problem relates to some state that intellij is keeping about my workspace.

Checking out Repro Code
===================

pub global activate -sgit g...@github.com:Andersmholmgren/jefe.git

cd <some dir of your choosing>


jefe install g...@github.com:Andersmholmgren/jefe_container.git

cd jefe_container_root

jefe start somethingInteresting

## This will have cloned several repos, created a feature branch in each called 'somethingInteresting' and set up path dependencies between them

## open the jefe_container_root in intellij with latest dart sdk and dart plugin for intellij
##
## IntelliJ IDEA 2016.1
## Build #IC-145.258, built on March 17, 2016
## JRE: 1.8.0_40-release-b132 x86_64
## JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

## enable dart support

## Now edit randomly in project jefe (this has the most dependencies on the other projects)



Tomasz Kubacki

unread,
Mar 25, 2016, 1:51:51 AM3/25/16
to Dart plugin for JetBrains Editors
Alex - thanks for info.

So it appears I was not using newest Dart plugin (since I used IntelliJ 2015 not 2016.1)

I will see few days how it behaves for a few days and if I notice analysis server dies I will report for sure.

By dying I mean I no longer have intellisense and I no longer have any messages on analysis tab in intelliJ (despite having some warning s at start)

Cheers,
t.k

Alexander Doroshko

unread,
Mar 25, 2016, 8:15:38 AM3/25/16
to Anders Holmgren, Leaf Petersen, Vijay Menon, Jaime Wren, Konstantin Shcheglov, Günter Zöchbauer, Dart plugin for JetBrains Editors
Thanks, Anders,
Your log contains millions of errors from the Dart Analysis Server. I've filed an issue with your log attached in Dart SDK's issue tracker:  https://github.com/dart-lang/sdk/issues/26090

Regards,
Alex

Anders Holmgren

unread,
Mar 25, 2016, 7:36:11 PM3/25/16
to Alexander Doroshko, Leaf Petersen, Vijay Menon, Jaime Wren, Konstantin Shcheglov, Günter Zöchbauer, Dart plugin for JetBrains Editors
Great thanks for filing Alex
Reply all
Reply to author
Forward
0 new messages