Reputation: 3970
I used intellij 13.1.1 on window7 64bit(32G memory). Sometimes when I'm editing .vm file(velocity template file), intellij hang suddenly. And then I restarted intellij.
As far as I experienced, editing with java source files and other files are OK. how should I do?
P.S. below is my vmoptions.
idea64.exe.vmoptions
-Xms4096m
-Xmx10240m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=1024m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Dfile.encoding=UTF-8
Upvotes: 1
Views: 398
Reputation: 31936
First, upgrade to 13.1.2 (release notes) that was release a couple of days ago. That version fixes a Mac specific hang (reported by a co-worker of mine) and a hang on Windows when opening projects that I reported. Those (or other fixes) may solve your issue. (I'm not seeing any Velocity specific fixes).
I agree with @d33j In the 10+ years of IDEA usage and daily forum visits & reading of bug reports (yes, I am obsessed with IntelliJ IDEA), the #1 cause of Hangs is people tweaking their VM options, and especially setting them too high. I highly recommend leaving all the default settings and only bump up the -Xmx
to 750m on a 32-bit machine, and maybe to 900m on a 64-bit machine using a 64-bit JDK and the idea64.exe. Any higher and you get GC pauses and other issues. I (and all my co-workers) have been using those settings for years with multiple very large complex projects open without any issues.
If after adjusting you still have issues, go to your log directory (Help > Show log). When a hang occurs, IDEA will output thread dumps. So you should see a threadDumps
directory with a current date and timestamp. Take a look at those and see if anything jumps out. In particular, anything in a third party plug-in.
The second biggest cause of hangs is an error in third party plug-ins. Disable any third party plug-ins. (Settings > [IDE Settings] Plugins and change the Show
dropdown to "Custom"). Disable all of those and restart. If the issue goes away, use a binary search to locate the problematic plug-in.
If none of the above solves the issue, Follow the instructions from the JetBrains support document Reporting performance problems and/or Getting a thread dump when IDE hangs and doesn't respond to submit the issue to them. Also attach your threadDump directory (as mentioned above) and log file.
Upvotes: 2