加速IntelliJ-Idea [英] Speedup IntelliJ-Idea

查看:510
本文介绍了加速IntelliJ-Idea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用intelliJ进行Scala开发并且上周获得了 8 GB 的新RAM,所以我想:时间使用它。我检查了我的任务管理器,发现使用 ~250mb 的intelliJ。从eclipse我知道调整JVM选项有助于提高速度,所以我用Google搜索...

I'm using intelliJ for Scala development and got 8 GB of new RAM last week, so I thought: time to use it. I checked my task manager and found intelliJ using ~250mb. From eclipse I knew that tweaking JVM options helped a lot in improving speed, so I googled ...

并找到这个用于OS X
我找不到JVM选项立即,所以我开始调整 Xmx。在1 GB时,我意识到它不再启动了。我检查了intelliJ java版本,发现它已经过时了,32位。

and found this one for OS X I couldn't find the JVM option immediately, so I started tweaking Xmx. At 1 GB, I realized it doesn't start any more. I checked the intelliJ java version, found it's outdated and 32bit.

因此,为了使用您当前的JDK和 64位,您必须将链接更改为:

So in order to use your current JDK and 64 bit you have to change your link to from:

IntelliJ IDEA Community Edition 10.0.2\bin\idea.exe

IntelliJ IDEA Community Edition 10.0.2\bin\idea.BAT

并调整开始

bat会查找 JDK_HOME 并立即使用64位。

The bat looks for JDK_HOME and uses 64bit now.

我当前的 VM选项,它位于

...\IntelliJ IDEA Community Edition 10.0.2\bin\idea.exe.vmoptions

-Xms512m
-Xmx1024m
-XX:MaxPermSize=512m
-ea
-server
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
-XX:+UnlockExperimentalVMOptions
-XX:+UseParallelGC

-XX:+ UseParallelGC ,你可以使用 -XX:+ UseConcMarkSweepGC


桌面应用程序的可接受选择,
但我最近改为吞吐量
收藏家。因为使用
快速机器和足够小的堆,
你有快速暂停,更多吞吐量
并且没有碎片问题
(ijuma。#scala)

the accepted choice for desktop apps, but I have changed to the throughput collector recently. because with a fast machine and a small enough heap, you have quick pauses, more throughput and no issues with fragmentation (ijuma. #scala)

更改:

-XX:+UseConcMarkSweepGC //removed
// removed, because not needed with the lastest JVM.
    -XX:+UnlockExperimentalVMOptions
    -XX:+DoEscapeAnalysis
    -XX:+UseCompressedOops

我现在坚持这些选择。我真的很想知道你的经历。

I'll stick to these options for now. I would really like to know your experience with it.

哪种选择最适合您?
如何通过 .bat 运行intelliJ时隐藏此cmd窗口? :)

Which options work best for you? How do I hide this cmd window while running intelliJ through the .bat? :)

顺便说一句,这是调整智能。基本上它在 p.20 / 21 上说关闭Windows恢复和系统dirs的防病毒。

By the way, here's another link for tuning intelliJ. Basically it says on p.20/21 to turn off windows restore and antivirus for system dirs.

另一种加速intelliJ的方法是将intellij系统文件夹放在 ramdrive (感谢OlegYch | h)。

Another way to speed up intelliJ is to put intellij system folder on ramdrive (thanks OlegYch|h).

from idea.properties 
idea.system.path=${idea.home}/.IntelliJIdea/system

参见< a href =https://superuser.com/questions/34388/whats-the-best-ramdisk-for-windows> Win 7 64位RAM驱动器的超级用户或这一个
1 GB对我来说似乎没问题。

See Superuser for Win 7 64bit RAM Drive or this one. 1 GB seems fine for me.

朋友给我的另一个提示是从防病毒软件中排除项目目录(扫描访问)

Another hint a friend gave me is to exclude the project directories from your antivirus (scan on access)

关于调整Eclipse有类似的帖子:

There are similar posts regarding tuning Eclipse:

  • Eclipse Helios 3.6
  • Eclipse Juno 4.2
  • Specify the JVM to start Eclipse with

推荐答案

这个组合在我在小牛队中运行的Intellij13上非常有效:

This combination works great on my Intellij13 running in Mavericks:

2017年7月18日更新

# custom IntelliJ IDEA VM options

-ea
-server
-Xms2G
-Xmx4096M
-Xss2m
-XX:MaxMetaspaceSize=2G
-XX:ReservedCodeCacheSize=1G
-XX:MetaspaceSize=512m
-XX:+UseConcMarkSweepGC
-XX:+DoEscapeAnalysis
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+UnlockExperimentalVMOptions
-Djava.net.preferIPv4Stack=true
-Dsun.io.useCanonCaches=false
-XX:LargePageSizeInBytes=256m
-XX:+UseCodeCacheFlushing
-XX:ParallelGCThreads=8
-XX:+DisableExplicitGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+PrintGCDetails
-XX:+PrintFlagsFinal
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
-XX:CMSInitiatingOccupancyFraction=60
-XX:+CMSClassUnloadingEnabled
-XX:+CMSParallelRemarkEnabled
-XX:+UseAdaptiveGCBoundary
-XX:+UseSplitVerifier
-XX:CompileThreshold=10000
-XX:+OptimizeStringConcat
-XX:+UseStringCache
-XX:+UseFastAccessorMethods
-XX:+UnlockDiagnosticVMOptions
-XX:+HeapDumpOnOutOfMemoryError
-XX:+UseCompressedOops
-XX:-OmitStackTraceInFastThrow
-Dawt.useSystemAAFontSettings=lcd

-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine

我将此设置更新为 https ://github.com/adben/config/blob/master/idea64.vmoptions

这篇关于加速IntelliJ-Idea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆