RustRover 2024.3 Help

Performance tuning tips

This article gives a summary of helpful techniques that you can use to improve RustRover performance on large-scale projects.

Increase memory heap

Enable memory indicator

To check whether performance slowdowns are caused by low heap memory, enable the memory indicator:

  • Navigate to View | Appearance | Status Bar Widgets and select Memory Indicator.

The memory indicator will appear in the bottom right corner:

Memory indicator

Increase memory heap

  1. Select Help | Change Memory Settings from the main menu.

  2. In the dialog that opens, set a higher memory heap value in the Maximum Heap Size field.

  3. Click Save and Restart.

Increasing heap in the Change Memory Settings dialog

RustRover also warns you if the amount of the free heap memory is less than 5% of the maximum heap size:

Low memory warning

Click Configure and enter a new heap size value in the dialog that opens.

Speed up code analysis

On-the-fly code analysis is one of the most performance-consuming processes in RustRover. Here's what you can do to lighten it up.

Disable on-the-fly external linter analysis

By default, external linters do not run on the fly. However, if you have configured them to do so, RustRover may experience performance slowdowns. In this case, you will see a notification:

External linters performance

If you see the notification, click Disbale.

Alternatively, navigate to Settings | Rust | External Linters and clear the Run external linter on the fly checkbox:

External linter settings: on-the-fly analysis off

Filter the list of inspections

By default, many RustRover inspections are set to run on the fly. To lighten up the process, you can reduce the list of these inspections: navigate to Settings | Editor | Inspections and browse through the list of inspections, clearing the checkboxes for those you prefer not to run on the fly.

Disable performance-consuming inspections

You will always be able to run inspections on demand using the Code | Running Code Cleanup with profile ''{0}'' command and explore the results in a separate tool window without affecting the editor. Also, you can postpone code analysis (and on-the-fly refactoring) until commit by setting up the Before Commit options.

Tune analysis for a file

You can configure the highlighting level for the currently opened file: none, syntax, or all problems. Use the inspection widget in the upper-right corner of the editor:

Inspection widget

Toggle Power Save mode

As an alternative to configuring individual checks or files one by one, try Power Save Mode. It disables all inspections and other highly-consuming background tasks for the entire IDE.

To enable Power Save Mode call File | Power Save Mode.

Power save mode ON

Speed up indexing

Exclude directories and file types

Your project may contain folders with binaries, logs, or build artifacts, which do not affect RustRover code insight. Also, indexing some folders can be too expensive due to their size or location. So it is reasonable to exclude such folders manually: right-click the directory in the project tree and select Mark Directory as | Excluded.

Mark directory as excluded

Since the symbols from the excluded files remain uncompleted for RustRover, the following features are not available for such files: code completion and auto-import, code generation, Find in Files (except for the scope of the currently opened files), navigation, and refactorings.

Another way to eliminate files like logs or generated data from indexing is to exclude them by file type in Settings | Editor | File Types:

Ignored files types

Disable unnecessary plugins

To increase the IDE performance, try disabling the plugins you don't need. You will always be able to turn them on again later.

  1. Go to Settings | Plugins.

  2. Browse the Installed tab and disable the unnecessary plugins:

    Disabling an unnecessary plugin

    You can also disable all manually installed plugins at once (the non-bundled ones) from the menu under The Settings button:

    Disable all downloaded plugins

Report performance problems

If you experience an IDE freeze or high CPU/memory usage, and the tips listed above do not help, please provide us with the IDE logs, thread dumps, and snapshots. For more information about retrieving and sending them, refer to this instruction.

Last modified: 17 December 2024