Extremely slow in autocompletion & code analysis for Kotlin projects in Intellij IDEA

前端 未结 4 1949
花落未央
花落未央 2021-02-07 07:14

We have a project on IDEA that consists of a couple med sized Java packages and one very small Kotlin package (5 files). I noticed performance is fine with any Java packages, bu

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-07 07:46

    I recently ran into this with a Kotlin gradle multi module project. I managed to get back to a good code analysis and completion speed by massively increasing my memory settings in the vmoptions, this is what they look like now

    -Xms512m
    -Xmx16384m
    -XX:ReservedCodeCacheSize=960m
    -XX:+UseConcMarkSweepGC
    -XX:SoftRefLRUPolicyMSPerMB=100
    -ea
    -XX:CICompilerCount=2
    -Dsun.io.useCanonPrefixCache=false
    -Djava.net.preferIPv4Stack=true
    -Djdk.http.auth.tunneling.disabledSchemes=""
    -XX:+HeapDumpOnOutOfMemoryError
    -XX:-OmitStackTraceInFastThrow
    -Djdk.attach.allowAttachSelf=true
    -Dkotlinx.coroutines.debug=off
    -Djdk.module.illegalAccess.silent=true
    -Dawt.useSystemAAFontSettings=lcd
    -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine
    -Dsun.tools.attach.tmp.only=true
    

提交回复
热议问题