Important note: if you want to build with IntelliJ (via its integrated build chain, not via gradle) the option you have to use is hidden in the "File -> Settings" dialog.
Go to "File -> Settings -> Compiler" and on the page details (right panel) set the "Build process heap size (Mbytes)" to a higher value (defaulted to 700MB for me).
But with my version of IntelliJ (2021.1.1) the setting was not in "File -> Settings -> Compiler" as you explained but was in (on a Mac):
"IntelliJ Idea (in the top bar) -> Preferences -> Build, Execution, Deployment -> Compiler"
There, on the left side of the "Compiler" screen, there's "Shared build process heap size (MBytes)" field that was by default set at "700", I changed to "8192" and it changed my life! 🥳
Glad to help out! It's ridiculous in many ways. It's so hidden and seemingly insignificant, yet has a huge impact. It's unaffected by any gradle setting. It's also unaffected by the Xmx setting of IntelliJ itself. It's not documented prominently anywhere.
That being said, even with enough RAM, the kotlin compiler is unfortunately not among the fastest compilers out there.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Important note: if you want to build with IntelliJ (via its integrated build chain, not via gradle) the option you have to use is hidden in the "File -> Settings" dialog.
Go to "File -> Settings -> Compiler" and on the page details (right panel) set the "Build process heap size (Mbytes)" to a higher value (defaulted to 700MB for me).
Thanks for your comment! It really helped me!
But with my version of IntelliJ (2021.1.1) the setting was not in "File -> Settings -> Compiler" as you explained but was in (on a Mac):
"IntelliJ Idea (in the top bar) -> Preferences -> Build, Execution, Deployment -> Compiler"
There, on the left side of the "Compiler" screen, there's "Shared build process heap size (MBytes)" field that was by default set at "700", I changed to "8192" and it changed my life! 🥳
See screenshot: dev-to-uploads.s3.amazonaws.com/up...
Glad to help out! It's ridiculous in many ways. It's so hidden and seemingly insignificant, yet has a huge impact. It's unaffected by any gradle setting. It's also unaffected by the Xmx setting of IntelliJ itself. It's not documented prominently anywhere.
That being said, even with enough RAM, the kotlin compiler is unfortunately not among the fastest compilers out there.