Performance Tips
Here you will find a few tips about what you can do to improve the performance of IntelliJ IDEA with Scala Plugin.
Ensure there's enough memory
To view the current memory usage, right-click the status bar and enable Memory Indicator (or Find Action "CPU and Memory Live Charts"). If necessary, use to increase the maximum heap size.
Make code highlighting-friendly
In the same way code has runtime performance, code has compile-time performance. "The laws of highlighting," just as the laws of physics, are real and should be respected for highlighting to be efficient. Please see the guidelines for how to make code highlighting-friendly.
Try Incremental Highlighting
When using the built-in highlighting, you can enable to highlight only what's visible. (Double-press Esc to highlight the entire file.) This helps reduce CPU, RAM, and battery use, especially in large complex files, and also increase responsiveness.
Use compiler-based highlighting without inspections
Using helps with false errors in complex code, but in normal cases it's usually slower and consumes more resources. However, if you also Disable built-in inspections, this can help with CPU, RAM, and battery use in cases challenging for the built-in type inference.
Capture CPU and memory snapshots
Sometimes, performance issues are inherent and depend on the code. Other times, the cause is an inefficiency in the algorithms. Follow the guidelines for reporting performance problems to capture CPU and memory snapshots and post them to the issue tracker, which can help us diagnose and fix the issue.
Get in touch
If you have any questions, we'd be glad to answer them in the Scala plugin discord channel.