scala editor very very slow

... and that on an i7 4770K. 

Autocomplete on any non-trivial class is very slow (effectively making copy-paste my preferred choice), same goes for error marking. I tend to just compile the code rather than wait for intellij to show me the errors.

It it possible for the editor to be optimised in the future? Or maybe more multithreading?

Btw, intellij has plenty of free memory when the slowdowns occur.

 

13 comments
Comment actions Permalink
Official comment

Thanks for the report! Please consider capturing CPU snapshots, as described in "Reporting Performance Problems" - they may really help us to debug and to fix the issue.

Comment actions Permalink

same here - the compiler is faster at showing errors at least if the project is big

the same is true for general performance. i have a lagre project and a small project i am working on, and in the small one, every feature is very fast, including autocompletion

in the large project, every action takes 1-2 seconds (after idea has build its secret caches - the first few minutes after opening the project are always very slow)

0
Comment actions Permalink

My i7 4770K needs several seconds to suggest autocomplete options and for some classes it takes a lot of time for the editor to hightlight errors. The code is pretty standard, no implicits etc. Parts of the code that use typesafe's slick are extremely slow to edit within the editor.

0
Comment actions Permalink

I observe the same behavior. I experience this with the latest Ultimate version on a tiny sbt project.

I have uploaded these files to your ftp:

IU-171.4694.23_R892107_09.06.2017_12.17.10.zip
IU-171.4694.23_R892107_09.06.2017_12.19.39.zip
 
I have scala code in a different gradle project and do not have these problems there.
1
Comment actions Permalink

Uploaded -> IU-171.4694.23_curtiscooley_16.06.2017_09.28.27.zip

0
Comment actions Permalink

Please try the nightly build 2017.1.908 of the scala plugin or newest versions for IDEA 2017.2 EAP.

0
Comment actions Permalink

Any update on this? Seems to be a widespread issue.

1
Comment actions Permalink

@Clintomed Have you tried nightly or IDEA 2017.2 EAP? If it doesn't help please attach your snapshots.

0
Comment actions Permalink

This problem persists in 2017.2.5. As pristine as I can make my setup—no other applications running, ran invalidate caches and restart, and so on—non-trivial Scala projects are unusably slow. It's not consistently so, however. There are moments of responsiveness, but I'm often waiting a second or two before my input registers. I won't even get started on autocomplete lag. There's some gain to be had by deleting my project's .idea directory and starting from scratch, but I can't afford to do this too many times a day given how long it takes to regenerate project files. I've historically experienced performance problems with the Scala plugin, but it seems to have recently hit a new low. FYI, this is on a 2016 MacBook Pro with 16 GB of RAM and a 2.9 GHz Core i7 (not highest end, but no slouch).

0
Comment actions Permalink

Please attach log directory or performance snapshot. 

0
Comment actions Permalink

I have uploaded snapshot :

IU-173.4301.25_styletheory_23.01.2018_14.40.31.zip

Issue: Editor performance slows down over time significantly, especially when opening complex Scala file.

0
Comment actions Permalink

Can you also upload a memory snapshot? Looks like garbage collection is to blame. Also, you may try to increase -Xmx for IDEA process (Help -> Edit Custom VM Options), default is often not enough for scala projects.

0
Comment actions Permalink

Hi Nikolay!

Thanks for the suggestion! We have upped the Xmx settings and it does wonder! We are not experiencing the lag any longer.

0

Please sign in to leave a comment.