1. 修改内存到合适大小
2. idea配置,\JetBrains\IntelliJ IDEA 2021.3.2\bin\idea64.exe.vmoptions
-Xms256m
-Xmx512m
-XX:ReservedCodeCacheSize=512m
-XX:InitialHeapSize=750m
-XX:MaxHeapSize=1024m
-XX:+IgnoreUnrecognizedVMOptions
-XX:+UseG1GC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off