5

I have been using Intellij 12 to build a Play Framework 2 app for about a month. It's been fine up until yesterday. Now when ever I try to write code in one of the scala templates Intellij gets very very very slow. Like it takes 5-10 seconds to enter a couple new lines. What would cause this to start happening all of a sudden and how do I fix it?

I tried increasing my vm options to the following, but it didn't help:

-Xms256m
-Xmx800m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=128m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops

Edit: Could a recent Intellij or plugin update have destroyed performance?

Edit: I updated my Scala and Play plugins and it didn't help.

TomahawkPhant
  • 1,130
  • 4
  • 15
  • 33
  • 2
    I also notice this hell slowly. :( – korrawit Feb 07 '13 at 19:08
  • Report at http://youtrack.jetbrains.net/issues/SCL with a [CPU snapshot](http://devnet.jetbrains.com/docs/DOC-192). Make sure to run under [Oracle JDK](http://stackoverflow.com/a/8384111/104891) and check that you don't have EclipseMod plug-in installed. – CrazyCoder Feb 07 '13 at 23:07

2 Answers2

2

I had a similar problem, switching to sun java from openjdk fixed it. Also check if it isn't doing something in the background like indexing or sth like that. Just a guess. Cheers!

Edit: google-fu resulted in one potencionally interesting fact. A lot of scala users are experiencing this. It looks that scala is only available in intellij 12 and this is a first version, so it's probably a problem on the side of scala devs.. if I manage to find a workaround I'll post it here. Brace for scala updates until then ;)

Dropout
  • 13,653
  • 10
  • 56
  • 109
  • I'm running OSX 10.8. Doesn't that use sun java by default? – TomahawkPhant Feb 08 '13 at 05:37
  • Dunno, never had OSX, open the console/ command prompt and you can check it by executing the "java -v" or "java -version" command. But it looks like a scala problem as I mentioned.. – Dropout Feb 08 '13 at 07:06
  • Ok. It doesn't say anything about sun. Its just this: java version "1.7.0_09" Java(TM) SE Runtime Environment (build 1.7.0_09-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode) – TomahawkPhant Feb 08 '13 at 22:25
  • That's OK, you got the right one. Problem is in Scala as I mentioned in the answer. Try to update it when a patch comes out.. Hope it gets fixed soon ;) – Dropout Feb 11 '13 at 07:28
2

FYI..

Try to update to new version (0.2.16)

http://plugins.jetbrains.com/plugin?pluginId=7080

korrawit
  • 1,000
  • 2
  • 18
  • 30
  • This worked after much messing around. I had to manually instal it because it wasn't available through intellij, but then scala wasn't compatible. I had to manually instal scala, but something didn't work and I had to remove scala. Then downloaded scala from scratch inside Intellij. Works now. – TomahawkPhant Feb 08 '13 at 23:11