idea下spring boot启动及编译速度优化


IDEA spring boot工程启动优化:
1、-XX:+AlwaysPreTouch -Xms1024m -Dspring.jmx.enabled=false -client
2、pc每隔两天重启下
3、所有的ipconfig清单里面的ip尤其是vmware的加到hosts文件
4、zk里面加上clientPortAddress=127.0.0.1
5、移除不需要的依赖,xiaoyaoji没有接口变更的时候调整为false
6、spring-boot-maven-plugin调整为如下:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>1.0.15.RELEASE</version>
</dependency>
</dependencies>
<version>2.2.6.RELEASE</version>
</plugin>
本地应用启动速度从122秒降低为62秒。

编译优化

1、去掉不必要的插件,比如混淆;

2、可以考虑开启多线程编译,增加CPU核心参数:-T 1C,参考https://blog.csdn.net/Wang__dream/article/details/102787464,或启用不总是下载包https://www.cnblogs.com/laoxia/p/9213136.html

3、增加idea参数,主要是-Xms加大,最好到1024以上,会快很多。

编译速度从22秒降低到12秒。

使用最新的JDK发行版,比如8u262。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM