Poor responsiveness/performance
Hey,
To those of you that are using Intellij IDEA as their scala development environment, do you have any tips regarding making it more responsive?
I have Intellij IDEA Community Edition 10 and 4G of RAM but it still feels sluggish, even noticeably more so than Eclipse... is this normal?
After googling around a bit I made some modifications to idea.vmoptions as follows (but it hasn't really helped much):
To those of you that are using Intellij IDEA as their scala development environment, do you have any tips regarding making it more responsive?
I have Intellij IDEA Community Edition 10 and 4G of RAM but it still feels sluggish, even noticeably more so than Eclipse... is this normal?
After googling around a bit I made some modifications to idea.vmoptions as follows (but it hasn't really helped much):
-Dsun.java2d.pmoffscreen=false
-XX:+UseConcMarkSweepGC
-Xms512m
-Xmx1024m
-XX:MaxPermSize=250m
-ea
I've now disabled IntelliLang as I heard it had performance issues when used with the Scala plugin... but it made no significant difference either.
In general editing is the biggest problem and it occurs on every project I have created, all of which were small "play" projects.
For example, the simple action of creating a new class by right-clicking on a package can take 1 second before a drop-down is displayed.
Also, I tried adding the following line to my idea.vmoptions file:
But... I get the following error (so I can't do a CPU snapshot at this stage):
I thought yjpagent was bundled with IDEA 10, so I'm not sure what's wrong here. Do I need to configure some property file first?
Any and all help greatly appreciated!
Regards,
Alex
In general editing is the biggest problem and it occurs on every project I have created, all of which were small "play" projects.
For example, the simple action of creating a new class by right-clicking on a package can take 1 second before a drop-down is displayed.
Also, I tried adding the following line to my idea.vmoptions file:
-agentlib:yjpagent=disablej2ee,disablecounts,disablealloc,sessionname=IntelliJIdea10
But... I get the following error (so I can't do a CPU snapshot at this stage):
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
Error occurred during initialization of VM
Could not find agent library on the library path or in the local directory: yjpagent
I thought yjpagent was bundled with IDEA 10, so I'm not sure what's wrong here. Do I need to configure some property file first?
Any and all help greatly appreciated!
Regards,
Alex
Please sign in to leave a comment.
As yjpagent wasn't included in Intellij IDEA Community Edition 10, I downloaded it from here:
http://www.yourkit.com/download/
I then:
IDEA started fine, but I don't see the "CPU snapshot" button anywhere in the toolbar... is there something I'm doing incorrectly?
Perhaps you can try the Ultimate Edition, with a evaluation licence?
-jason
Thanks for the suggestion Jason,
I just downloaded and installed it. Performance is still poor, but at least the CPU snapshot functionality works now... so I've attached snapshot results to this message.
Can someone take a look at them from here, or is it better to submit a different way?
Cheers,
Alex
Attachment(s):
IU-99.32_alex_10.01.2011_15.09.22.zip
Can you describe more precisely which aspect of performance is a problem? Editing, Autocomplete, Error Highlighting, or Build?
Could you disable the IntelliLang plugin, restart, and check again for the performance?
Sure...
So it's the general usage that bothers me... coding/typing, response to mouse actions like right-clicking on folders/packages, delay in auto completion, etc.
I'm not complaining about build time or any advanced features at this stage, as I would already be much happier if I could get the basics to work more quickly.
Cheers,
Alex
Just did so, because I have no way of "benchmarking" the performance in a repeatable way I'm not sure how much difference it made... but unfortunately it doesn't feel much/any different.
Let's focus on slow performance when editing files: typing and pressing enter. This should absolutely keep up with even the fastest typers.
If you find a situation where this isn't the case, capture a CPU snapshot for, say, 30 seconds, of this slow behaviour and post here.
Also, let us know what version of the plugin you are using.
Thanks for taking the time to provide the detailed feedback,
-jason
Hi Jason,
Attached is a snapshot after me typing for a short while... not much enter pressing, mostly typing characters and a little backspacing.
I haven't done any "dropdown selecting" in this snapshot, but please note that this is also an annoyingly slow operation at present.
I have scala plugin version 0.4.407
Thanks for your time!
Alex
Attachment(s):
IU-99.32_alex_11.01.2011_10.08.30.zip
For maximum performance, I recommend to:
disable 'Settings, Editor, Code Completion, Autopopup Code Completion'
disable 'Settings, Code Style, Scala, Other settings, Enable experimental error highlighting'
-jason
If I do that, will auto completion still work when I press ctrl+space?
And, will I get any visual feedback regarding errors?
Thanks for the tips
Completion will work without autopopup completion.
Performance won't be better if you disable "experimental highlighting" (because all info for this highlighting used in "unused imports" feature, which is enabled by default, so this setting can't add additional computations). For better response you can disable 1. Scala Injections 2. Some Scala Inspections (like val/var usages and etc.). I'm sure 2 should help in your case.
Best regards,
Alexander Podkhalyuzin.
Yes, CTRL-SPACE still pops up autocomplete.
Some errors will not be highlighted. This feature is labelled 'experimental' because is sometimes marks valid code red, and it slows down the error highlighting pass a little.
See the usages of 'advancedHighlighting' in the package org.jetbrains.plugins.scala.annotator in the plugin sources if you're interested as to what is excluded:
http://git.jetbrains.org/?p=idea/scala-plugin.git;a=blob;f=src/org/jetbrains/plugins/scala/annotator/ScalaAnnotator.scala;h=4f20c377e00ecf4fbbdaeb3b7ef6a3b7ff0aec4d;hb=HEAD
-jason
Hi Alexander,
Thanks, can you tell me where to find these settings so I can disable them.
Regards,
Alex
Settings -> Inspections -> Scala.
The longest one of them is "var could be val" inspection.
Injections you can find here:
Settings -> Language Injections.
Now I'm not sure that it helps, because I just tried to do the same (just for inspections), and performance almost the same. So it was a workaround, now I see it's not. It seems I need one more try to improve performance.
Best regards,
Alexander Podkhalyuzin.
Thanks Alexander,
I just tried it too, but unfortunately I can't really notice any difference in performance either.
Is it just me that is experiencing very sluggish performance, or do other people experience too but are happy to live with it?
I'm working on a project with about 20KLOC of Scala. Performance is really good for the editor (it wasn't always this way).
Performance for error highlighting is still slow in larger files where a lot of type inference is needed.
Providing CPU snapshots is a really good way to help us track down the problems; along with a description of what you were doing and the performance problem (e.g. 100ms delay after hitting enter, editor locks up for 3s on frame deactivation/reactivion).
As for me, I'm using plugin for developing Scala plugin and performance is almost ok. I'm sure that it's possible to make it much slower, so performance is still an big issue, but I can't promise you, that I'll try to improve performance even more in the nearest future, maybe 2-3 weeks.
Best regards,
Alexander Podkhalyuzin.