Running 11.1.1 with any of several Scala plug-ins from the past several days, I'm seeing such horrendous pauses (with high CPU use) that IDEA is entirely unusable...
I thought issue just popped up in the middle of the day, but what in fact happened was I started working on a particular file I had not touched for a few weeks. This particular source has a very large XML literal with lots of interpolated code.
The behaviors I see are prolonged spikes of CPU usage accompanied by complete non-responsiveness of the application whenever I make any kind of change to the source code, including trivial changes such as adding a blank line.
Any editing action immediately triggers the CPU spike. Additionally, the display of the new state of the source (typed input, cut, cleared or pasted text) is deferred until after the CPU spike concludes. Some non-editing actions such as search for usages also trigger the CPU spike.
Quantitatively: Pressing the ENTER key on an already blank line at the top level of a class causes the cursor to disappear (the new line is not echoed), the CPU spikes immediately, after about 30 seconds the new line is displayed and the cursor reappears but the CPU spike continues until 50 seconds have elapsed, then it drops back to normal idle rates (a few percent CPU).
Editing other files does not present this problem.
I cleared and re-built all the IDEA caches (twice). I also rebooted my Mac before the 2nd cache reset.
IDEA: 11.1.1 / #117.117 Scala plug-in: 0.5.527, 0.5.531, 0.5.536, 0.5.542 Java: java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) OS: Mac OS 10.7.1
I just fixed bug introduced into 0.5.536 (3 April). It was performance bug, which made lexer non-linear (so it was simply reproduced for just big file). However I still can't explain slow typing in 0.5.527 (even with XML).
I started new nighlty build uploading. After ~20 minutes, you will be able to check 0.5.551. If problem still exists, can you capture CPU snapshot? (http://devnet.jetbrains.net/docs/DOC-192)
I have uploaded a CPU capture that resulted from pressing the ENTER with the cursor between definitions nested within a def at the top level of a class. The capture file name is IU-117.117_rschulz_05.04.2012_07.20.28.zip.
I've also attached two tarballs containing the automatically generated thread dumps. The first (threadDumps-20120405-070310-IU-117.117.tar.gz) was from starting up with the new 0.5.551 plug-in and then quitting (this includes a re-index due to the new plug-in). The second (threadDumps-20120405-070922-IU-117.117.tar.gz) is from starting up a second time with the new plug-in.
Hm, it's exactly what I have fixed. I even decompiled _ScalaCoreLexer.advance() method from 0.5.551 sacla-plugin.jar, and it doesn't contain toCharArray() and toString() method as expected (in snapshot 53000 ms for advance method 44000 was for toCharArray() and 6700 for toString() method, so for 0.5.551 it mast be much faster). Other thing is that still remains 2300 ms, it's usable but still have possibilities for improvents (incremental lexer should resolve this issue).
No, I always update the Scala plug-in manually and I have only the main JetBrains plug-in repository configured in the plug-in manager. I've have never actually added a custom or 3rd-party plug-in repo to IDEA.
I just updated to 0.5.554 and it does report its version consistenly inside IDEA (which 0.5.551 did not).
This version is better. Trivial (whitespace) changes still cause a pulse of CPU use (with what appears a characteristic double peak with a dip in between if you make a change and wait for the CPU use to settle down) but the editor does not become unresponsive while the CPU spike is occurring. Ordinary editing is no longer impaired, though it does keep the CPU pretty busy.
I checked our recent xml improvements, and I also see slow typing in embedded scala xml. Maybe problem is about xml for you?
Best regards,
Alexander Podkhalyuzin.
Can you also send me snapshot of this pauses?
Best regards,
Alexander Podkhalyuzin.
No, no xml. I'll get some dumps, but I'm out most of today.
I'm not really seeing this now. So maybe it was a decoy. I'll post the dump if it occurs again.
So it is probably memory problems.
Best regards,
Alexander Podkhalyuzin.
Probaby not from my settings. I run idea with xmx 2G and 512M for classes.
Running 11.1.1 with any of several Scala plug-ins from the past several days, I'm seeing such horrendous pauses (with high CPU use) that IDEA is entirely unusable...
I thought issue just popped up in the middle of the day, but what in fact happened was I started working on a particular file I had not touched for a few weeks. This particular source has a very large XML literal with lots of interpolated code.
The behaviors I see are prolonged spikes of CPU usage accompanied by complete non-responsiveness of the application whenever I make any kind of change to the source code, including trivial changes such as adding a blank line.
Any editing action immediately triggers the CPU spike. Additionally, the display of the new state of the source (typed input, cut, cleared or pasted text) is deferred until after the CPU spike concludes. Some non-editing actions such as search for usages also trigger the CPU spike.
Quantitatively: Pressing the ENTER key on an already blank line at the top level of a class causes the cursor to disappear (the new line is not echoed), the CPU spikes immediately, after about 30 seconds the new line is displayed and the cursor reappears but the CPU spike continues until 50 seconds have elapsed, then it drops back to normal idle rates (a few percent CPU).
Editing other files does not present this problem.
I cleared and re-built all the IDEA caches (twice). I also rebooted my Mac before the 2nd cache reset.
IDEA: 11.1.1 / #117.117
Scala plug-in: 0.5.527, 0.5.531, 0.5.536, 0.5.542
Java: java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
OS: Mac OS 10.7.1
Randall Schulz
It seems we have an exponent in xml lexing. I'll try to fix it as soon as possible. It can be related to http://youtrack.jetbrains.com/issue/SCL-3532
Best regard,
Alexander Podkhalyuzin.
I'm seeing this too while editing files that have no XML. Do you know what was the last version that worked well?
Best,
Ismael
I just fixed bug introduced into 0.5.536 (3 April). It was performance bug, which made lexer non-linear (so it was simply reproduced for just big file).
However I still can't explain slow typing in 0.5.527 (even with XML).
Best regards,
Alexander Podkhalyuzin.
I started new nighlty build uploading. After ~20 minutes, you will be able to check 0.5.551. If problem still exists, can you capture CPU snapshot? (http://devnet.jetbrains.net/docs/DOC-192)
Best regards,
Alexander Podkhalyuzin.
Hi,
Unfortunately, the symptom remains.
I have uploaded a CPU capture that resulted from pressing the ENTER with the cursor between definitions nested within a def at the top level of a class. The capture file name is IU-117.117_rschulz_05.04.2012_07.20.28.zip.
I've also attached two tarballs containing the automatically generated thread dumps. The first (threadDumps-20120405-070310-IU-117.117.tar.gz) was from starting up with the new 0.5.551 plug-in and then quitting (this includes a re-index due to the new plug-in). The second (threadDumps-20120405-070922-IU-117.117.tar.gz) is from starting up a second time with the new plug-in.
Randall Schulz
Attachment(s):
threadDumps-20120405-070922-IU-117.117.tar.gz
threadDumps-20120405-070310-IU-117.117.tar.gz
Hm, it's exactly what I have fixed. I even decompiled _ScalaCoreLexer.advance() method from 0.5.551 sacla-plugin.jar, and it doesn't contain toCharArray() and toString() method as expected (in snapshot 53000 ms for advance method 44000 was for toCharArray() and 6700 for toString() method, so for 0.5.551 it mast be much faster). Other thing is that still remains 2300 ms, it's usable but still have possibilities for improvents (incremental lexer should resolve this issue).
Best regards,
Alexander Podkhalyuzin.
Alexander,
It appears there may have been a packaging mix-up. I installed the 0.5.551 file from http://download.jetbrains.com/scala/scala-intellij-bin-0.5.551.zip but when installed, it reports that it is 0.5.542.
Randall Schulz
Do you use automatic nighlty build update? I saw some issues with IDEA plugin manager, when you are using additional repositories.
Best regards,
Alexander Podkhalyuzin.
I just fixed lexer to be incremental. Now I haven't problems with in typing in file with 10k lines (parser is already incremental).
Best regards,
Alexander Podkhalyuzin.
Alexander,
No, I always update the Scala plug-in manually and I have only the main JetBrains plug-in repository configured in the plug-in manager. I've have never actually added a custom or 3rd-party plug-in repo to IDEA.
I just updated to 0.5.554 and it does report its version consistenly inside IDEA (which 0.5.551 did not).
This version is better. Trivial (whitespace) changes still cause a pulse of CPU use (with what appears a characteristic double peak with a dip in between if you make a change and wait for the CPU use to settle down) but the editor does not become unresponsive while the CPU spike is occurring. Ordinary editing is no longer impaired, though it does keep the CPU pretty busy.
Randall Schulz