linux idea 启动慢、运行慢

在安装路径的conf下面找到文件 idea64.vmoptions 配置下面内容

-server
-Xms1024m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow

# jit
-XX:CICompilerCount=2
-XX:TieredStopAtLevel=1
-XX:MaxInlineLevel=3
-XX:Tier4MinInvocationThreshold=100000
-XX:Tier4InvocationThreshold=110000
-XX:Tier4CompileThreshold=120000
-Dcom.sun.awt.use.national.layouts=true

或者在 /home/zeekling/.config/JetBrains/IdeaIC2023.1下面找到 idea64.vmoptions文件。写入下面内容:

-server
-Xms500m
-Xmx3000m
-XX:ReservedCodeCacheSize=240m
-Xverify:none
-XX:+UseZGC
-XX:SoftRefLRUPolicyMSPerMB=10M
-XX:+DisableExplicitGC
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:+IgnoreUnrecognizedVMOptions
-XX:ConcGCThreads=2
-XX:CompileCommand=exclude,com/intellij/openapi/vfs/impl/FilePartNodeRoot,trieDescend
-ea
-Dsun.io.useCanonCaches=false
-Dsun.java2d.metal=true
-Djbr.catch.SIGABRT=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true
-Dawt.lock.fair=true
-Djava.net.preferIPv4Stack=true

# jit
-XX:CICompilerCount=2
-XX:TieredStopAtLevel=1
-XX:MaxInlineLevel=3
-XX:Tier4MinInvocationThreshold=100000
-XX:Tier4InvocationThreshold=110000
-XX:Tier4CompileThreshold=120000
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-Dcom.sun.awt.use.national.layouts=true


其中内存参数可以按照自己笔记本的内存大小设置。重启Idea之后生效。



标 题:《linux idea 启动慢、运行慢
作 者:zeekling
提 示:转载请注明文章转载自个人博客:浪浪山旁那个村

    评论
    1 评论
    2023-07-16 08:53 回复»

    技术文,我也来评论。😄

avatar

取消