在安装路径的 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 之后生效。
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于