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):

-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:


-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

0
Avatar
Permanently deleted user

As yjpagent wasn't included in Intellij IDEA Community Edition 10, I downloaded it from here:
http://www.yourkit.com/download/

I then:

  • copied the file yjp-9.5.3/bin/linux-x86-64/libyjpagent.so into idea-IC-99.32/bin/ (I have a 64bit machine)
  • added -agentlib:yjpagent=disablej2ee,disablecounts,disablealloc,sessionname=IntelliJIdea10 to idea.vmoptions
  • started IDEA


IDEA started fine, but I don't see the "CPU snapshot" button anywhere in the toolbar... is there something I'm doing incorrectly?

0
Avatar
Permanently deleted user

Perhaps you can try the Ultimate Edition, with a evaluation licence?

-jason

0
Avatar
Permanently deleted user

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
0
Avatar
Permanently deleted user

Can you describe more precisely which aspect of performance is a problem? Editing, Autocomplete, Error Highlighting, or Build?

0
Avatar
Permanently deleted user

Could you disable the IntelliLang plugin, restart, and check again for the performance?

0
Avatar
Permanently deleted user

Sure...

  • Build: not a problem because I generally build using sbt in console
  • Error highlighting: Slow, more than a second to turn text red after I type in an obvious error.
  • Autocomplete: Roughly same delay time as error highlighting
  • Editing: Also laggy, roughly same delay time as error highlighting i.e. I can easily type faster than the editor displays what I've typed


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

0
Avatar
Permanently deleted user

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.

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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
0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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

0

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.

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

Hi Alexander,
Thanks, can you tell me where to find these settings so I can disable them.
Regards,
Alex

0

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.

0
Avatar
Permanently deleted user

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?

0
Avatar
Permanently deleted user

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).

0

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.

0

请先登录再写评论。