我的 IntelliJ Idea 2016.2 启动速度很慢,显示“选择您的项目”大约需要 5 分钟。以前加载很快,但是突然一天就开始慢慢加载了。受到影响的不仅是 IntelliJ Idea,而且 Android Studio 启动缓慢,并且gradle run
gradle 项目启动缓慢。
但是应用程序加载后,它运行良好,只是它不时冻结几秒钟。
根据 IntelliJ 帮助网站,我尝试添加
-agentlib:yjpagent=delay=10000
在idea.vmoptions
文件的末尾~/Library/Preferences/<product>
,但这根本不起作用,事实上,IntelliJ 甚至没有以这种方式启动。
设备:这是在带有OS X El Capitan 10.11.4
.
线程转储:
2016-11-22 10:01:37.716 idea[1275:29621] allVms required 1.8*,1.8+
2016-11-22 10:01:37.723 idea[1275:29627] fullFileName is: /Applications/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions
2016-11-22 10:01:37.723 idea[1275:29627] fullFileName exists: /Applications/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions
2016-11-22 10:01:37.723 idea[1275:29627] Value of IDEA_VM_OPTIONS is (null)
2016-11-22 10:01:37.724 idea[1275:29627] Processing VMOptions file at /Applications/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions
2016-11-22 10:01:37.724 idea[1275:29627] Done
^\2016-11-22 10:01:40
Full thread dump OpenJDK 64-Bit Server VM (25.112-b2 mixed mode):
"Service Thread" #9 daemon prio=9 os_prio=31 tid=0x00007fc0b912f800 nid=0x5203 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread2" #8 daemon prio=9 os_prio=31 tid=0x00007fc0ba08d800 nid=0x5003 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" #7 daemon prio=9 os_prio=31 tid=0x00007fc0ba085000 nid=0x4e03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #6 daemon prio=9 os_prio=31 tid=0x00007fc0ba014800 nid=0x4c03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" #5 daemon prio=9 os_prio=31 tid=0x00007fc0ba000000 nid=0x4a03 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Surrogate Locker Thread (Concurrent GC)" #4 daemon prio=9 os_prio=31 tid=0x00007fc0b90f1800 nid=0x4607 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007fc0b90da800 nid=0x4403 in Object.wait() [0x00007000011b4000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000791208e98> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x0000000791208e98> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007fc0b90d7800 nid=0x4203 in Object.wait() [0x00007000010b1000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000791206b40> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
- locked <0x0000000791206b40> (a java.lang.ref.Reference$Lock)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
"main" #1 prio=5 os_prio=31 tid=0x00007fc0b9808000 nid=0x2703 runnable [0x0000700000999000]
java.lang.Thread.State: RUNNABLE
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:103)
at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:893)
at sun.misc.URLClassPath$JarLoader.access$700(URLClassPath.java:756)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:838)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:831)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:830)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:803)
at sun.misc.URLClassPath$3.run(URLClassPath.java:530)
at sun.misc.URLClassPath$3.run(URLClassPath.java:520)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:519)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:492)
- locked <0x000000079124ed78> (a sun.misc.URLClassPath)
at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:457)
- locked <0x000000079124ed78> (a sun.misc.URLClassPath)
at sun.misc.URLClassPath.getResource(URLClassPath.java:211)
at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
- locked <0x0000000791256058> (a java.lang.Object)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
- locked <0x0000000791255fd0> (a java.lang.Object)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
"VM Thread" os_prio=31 tid=0x00007fc0b9016000 nid=0x4003 runnable
"Gang worker#0 (Parallel GC Threads)" os_prio=31 tid=0x00007fc0ba010800 nid=0x3603 runnable
"Gang worker#1 (Parallel GC Threads)" os_prio=31 tid=0x00007fc0ba011800 nid=0x3803 runnable
"Gang worker#2 (Parallel GC Threads)" os_prio=31 tid=0x00007fc0b9012000 nid=0x3a03 runnable
"Gang worker#3 (Parallel GC Threads)" os_prio=31 tid=0x00007fc0b9013000 nid=0x3c03 runnable
"Concurrent Mark-Sweep GC Thread" os_prio=31 tid=0x00007fc0b9014000 nid=0x3e03 runnable
"VM Periodic Task Thread" os_prio=31 tid=0x00007fc0ba084000 nid=0x5403 waiting on condition
JNI global references: 3
Heap
par new generation total 39296K, used 1397K [0x0000000791200000, 0x0000000793ca0000, 0x00000007a0c00000)
eden space 34944K, 4% used [0x0000000791200000, 0x000000079135d780, 0x0000000793420000)
from space 4352K, 0% used [0x0000000793420000, 0x0000000793420000, 0x0000000793860000)
to space 4352K, 0% used [0x0000000793860000, 0x0000000793860000, 0x0000000793ca0000)
concurrent mark-sweep generation total 87424K, used 0K [0x00000007a0c00000, 0x00000007a6160000, 0x00000007c0000000)
Metaspace used 2297K, capacity 4480K, committed 4480K, reserved 1056768K
class space used 247K, capacity 384K, committed 384K, reserved 1048576K
更新 1
事实证明,运行 Processing 草图需要的时间比以前要长。单击“运行草图”后,草图需要一些时间才能运行。
我正在寻找的只是这个问题的解决方案,关于如何修复我的 IntelliJ Idea,如何使其正常运行(快速)并且没有任何冻结。任何帮助表示赞赏。