# Performance tips

> **TL;DR**
> Required plugin: Scala: [how to install](get-started-with-scala.html#scala_plugin)

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 `Help | Change Memory Settings` 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](https://blog.jetbrains.com/scala/2026/05/07/how-to-make-code-highlighting-friendly/).

## Try Incremental Highlighting

When using the built-in highlighting, you can enable `Settings | Languages | Scala | Editor | Incremental highlighting` to [highlight only what's visible](https://blog.jetbrains.com/scala/2026/04/21/incremental-highlighting/). (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 `Settings | Languages | Scala | Editor | Error highlighting: Compiler` 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](https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems) to capture CPU and memory snapshots and post them to the [issue tracker](https://youtrack.jetbrains.com/issues/SCL#newissue), 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](https://discord.gg/aUKpZzeHCK).

