使用Maven和IntelliJ IDEA处理大型项目的提示 [英] Tips for Handling large projects with Maven and IntelliJ IDEA
问题描述
我在阅读 这个 博客文章,关于团队使用Intellij Idea进行大型Maven项目的经验,还查看了
I was reading this blog post about the experience of a team using Intellij Idea for large maven projects and have also looked at a similar question posted around 2 years back for IDEA v.10.0.2.
类似 问题在IDEA v.10.0.2的大约2年后发布。前者有很大的意义:
将 C:\Users\ $ user\.IntelliJIdea12
移动到不能访问的文件夹
One of the tips mentioned in the former made a whole lot of sense :
Move C:\Users\$user\.IntelliJIdea12
into a folder not access-scanned by the antivirus.
我搜索了以性能为中心的VM选项,目前我的 idea64.exe.vmoptions
看起来像这样:
I have searched around for performance centric VM options and currently my idea64.exe.vmoptions
looks like this :
-Xms1200m
-Xmx1200m
-XX:MaxPermSize=200m
-ea
-server
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
-XX:+UnlockExperimentalVMOptions
-XX:+UseParallelGC
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-Dsun.io.useCanonCaches=false
问题
Questions
-
您有任何更多的提示来改善Intellij IDEA
Do you have any more such tips to improve Intellij IDEA (12.1.3, 64 bit) performance with large/huge maven projects ?
您可以分享您在 idea64中制作wrt VM选项的发现。 exe.vmoptions
和/或IDEA配置
Could you please share discoveries you have made w.r.t VM options in idea64.exe.vmoptions
and/or IDEA configuration in idea.properties
.
我已经尝试使用JDK 7启动IDEA,但这似乎不会严重影响它的性能单向或其他。
I have tried using JDK 7 to startup IDEA but this does not seem to terribly affect it's performance one way or the other. If you have tried doing so, did you experience the same ?
推荐答案
根据@CrazyCoder的建议,我按照官方常见问题中关于此事的步骤:
As suggested by @CrazyCoder, I followed the steps on the official FAQ regarding this matter:
具体来说,以下似乎有明显的影响:
Specifically, the following seemed to have had an appreciable affect:
-
移动了
c:/Users/$user/.IntelliJIdea12
到McAfee的访问扫描程序排除的位置,并更新$ INTELLJ_INSTALL_FOLDER / bin / idea.properties
以指向新位置,如下所示(其中c:/ dev
是McAfee排除的文件夹):
Moved the
c:/Users/$user/.IntelliJIdea12
to a location excluded by McAfee's on-access-scanner, and updated$INTELLJ_INSTALL_FOLDER/bin/idea.properties
to point to the new location like so (wherec:/dev
is the folder excluded by McAfee):
idea.config.path = c: /dev/.IntelliJIdea12/config
idea.system.path = c:/dev/.IntelliJIdea12/system
idea.plugins.path = c:/dev/.IntelliJIdea12/ config / plugins
idea.log.path = c:/dev/.IntelliJIdea12/system/log
idea.config.path=c:/dev/.IntelliJIdea12/config
idea.system.path=c:/dev/.IntelliJIdea12/system
idea.plugins.path=c:/dev/.IntelliJIdea12/config/plugins
idea.log.path=c:/dev/.IntelliJIdea12/system/log
在 $ INTELLJ_INSTALL_FOLDER / bin / idea.properties
中设定 idea.jars.nocopy = true
记录在 this 网志文章。
In $INTELLJ_INSTALL_FOLDER/bin/idea.properties
set idea.jars.nocopy=true
as documented in this blog post.
还原到股票 $ INTELLIJ_INSTALL_FOLDER / bin / idea64.exe.vmoptions
。保留的唯一更改是在 过低的堆大小 中建议的64-位JVM。这是我目前在该文件中有什么:
Reverted back to the stock $INTELLIJ_INSTALL_FOLDER/bin/idea64.exe.vmoptions
. The only changes that remains are those suggested in Too low heap size for a 64-bit JVM. Here is what I have in the that file currently:
-Xms1200m
-Xmx1200m
-XX:+ UseCompressedOops
-XX:MaxPermSize = 350m
-XX:ReservedCodeCacheSize = 96m
-XX:+ UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches = false
-Djava.net.preferIPv4Stack = true
-Xms1200m
-Xmx1200m
-XX:+UseCompressedOops
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
禁用Git集成插件,因为我大多使用命令行Cygwin-Git。
Disabled Git integration plugin since I mostly use command line Cygwin-Git.
code> .IntelliJIdea12 / idea.log 。
例如:我在尝试打开项目中的zip文件时看到它经常记录错误后,禁用了osmorc(for OSGI)插件。示例错误:
It was useful to monitor .IntelliJIdea12/idea.log
.
For example : I disabled the osmorc (for OSGI) plugin after seeing that it was frequently logging error while trying to opening zip files in the projects. Sample error :
WARN - pi.vfs.impl.jar.JarHandlerBase - 打开zip文件错误:
C: \\dev\a-maven-project\pom.xml java.util.zip.ZipException:
中的打开zip文件中的错误
at java.util.zip.ZipFile.open(Native Method)< br>
at java.util.zip.ZipFile。(ZipFile.java:127)
at java.util.zip.ZipFile。(ZipFile.java:143)
WARN - pi.vfs.impl.jar.JarHandlerBase - error in opening zip file: C:\dev\a-maven-project\pom.xml java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:127)
at java.util.zip.ZipFile.(ZipFile.java:143)
禁用了我不需要的所有插件。目前禁用的插件列表为:
Disabled all the plugins that I do not need. The current list of disabled plugins is :
已停用的插件:ASP(0.1),Android设计器,Android支持(10.0) b Atlassian Connector for IntelliJ IDE(3.0.9,SVN:1212171008),Base
Cucumber(1.0),BashSupport(1.1beta16),CFML支持(3.53),
CheckStyle-IDEA集成(2.0),Cloud Foundry
集成(1.0),CloudBees集成(1.0),Commander(1.0.0),
复制为HTML(0.8.1),Cucumber for Groovy对于Java
(1.0),数据库导航器(3.0.2501),描述键(0.3),Drools
支持(1.0),Eclipse集成(3.0),Flash / Flex支持$ b GWT支持(1.0),Geronimo Integration(1.0),Git集成(8.1),
GitHub,Google App Engine集成(1.1.4),Grep控制台(1.1),
GuiceyIDEA ,HAML,IDEtalk(1.0),IdeaVim(0.28),标识符
Highlighter(3.62),IntelliJad Plus(0.5.6),JBoss Integration(1.0),
JBoss jBPM(2.0.0)插件(2.0.2),JavaFX(1.0),Key启动器
(1.0.11),Log4JPlugin(1.02),Markdown(0.8.3),Osmorc(1.4.3),
Perforce Integration 2.0),PluginUpdateNotifier(2.0.3),RemoteTail
(0.3.4),Resin Integration(8.1),Ruby(5.4.0.20130410),SQL查询
插件),Seam支持(1.0),Seam支持(1.0),SmarterEditor(0.8.3),Struts
导航插件(1.3.4),Subversion集成),TFS
集成(999.999),Tapestry支持(1.0),TestNG-J(8.0),UI
设计器,UI设计器(Core),Vaadin支持(1.0),Visual SourceSafe
集成(2.0),WebLogic集成(1.0),WebSphere集成
(1.0),ZKM-Unscramble(1.0),dmServer支持(0.9.5),hg4idea(10.0),
soapUI插件
Disabled plugins: ASP (0.1), Android Designer, Android Support (10.0), Atlassian Connector for IntelliJ IDE (3.0.9, SVN:1212171008), Base Cucumber (1.0), BashSupport (1.1beta16), CFML Support (3.53), CheckStyle-IDEA (4.2), ClearCase Integration (2.0), Cloud Foundry integration (1.0), CloudBees integration (1.0), Commander (1.0.0), Copy as HTML (0.8.1), Cucumber for Groovy (1.0), Cucumber for Java (1.0), Database Navigator (3.0.2501), Describe Key (0.3), Drools Support (1.0), Eclipse Integration (3.0), Flash/Flex Support (1.0), GWT Support (1.0), Geronimo Integration (1.0), Git Integration (8.1), GitHub, Google App Engine Integration (1.1.4), Grep Console (1.1), GuiceyIDEA (8.0), HAML, IDEtalk (1.0), IdeaVim (0.28), Identifier Highlighter (3.62), IntelliJad Plus (0.5.6), JBoss Integration (1.0), JBoss jBPM (2.0.0), JRebel Plugin (2.0.2), JavaFX (1.0), Key promoter (1.0.11), Log4JPlugin (1.02), Markdown (0.8.3), Osmorc (1.4.3), Perforce Integration (2.0), PluginUpdateNotifier (2.0.3), RemoteTail (0.3.4), Resin Integration (8.1), Ruby (5.4.0.20130410), SQL Query Plugin (2.2), SSH Remote Run (0.1), Seam Pageflow Support (1.0), Seam Pages Support (1.0), Seam Support (1.0), SmarterEditor (0.8.3), Struts Navigator Plugin (1.3.4), Subversion Integration (1.1), TFS Integration (999.999), Tapestry support (1.0), TestNG-J (8.0), UI Designer, UI Designer (Core), Vaadin Support (1.0), Visual SourceSafe Integration (2.0), WebLogic Integration (1.0), WebSphere Integration (1.0), ZKM-Unscramble (1.0), dmServer Support (0.9.5), hg4idea (10.0), soapUI Plugin (3.5)
这篇关于使用Maven和IntelliJ IDEA处理大型项目的提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!