AppCode 2020.1 Help

Enhance performance

This article gives a summary of helpful techniques that you can use to improve AppCode 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:

  • Right-click the status bar 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.

Increase memory heap from Toolbox

When you cannot access the Change Memory Settings dialog from the AppCode main menu, you still can change the memory heap size from Toolbox:

  1. Select your AppCode version in Toolbox and click the screw nut button on the right.

  2. From the menu that opens, select Settings.

  3. Go to the Configuration section and set a new value in the Maximum heap size field:

    Change heap size from Toolbox

  4. Restart AppCode.

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

The Low Memory warning

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

In case AppCode is running out of memory when attempting to perform some operation, the Out of Memory dialog appears where you can set a higher value in the -Xmx field.

Speed up code analysis

Filter the list of inspections

On-the-fly code analysis is one of the most performance-consuming processes in AppCode. To lighten it up, shorten the list of inspections in Preferences | Editor | Inspections (see other ways of disabling and suppressing inspections).

You will always be able to run inspections on demand using the Code | Inspect Code 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

To change the level of code analysis for the currently opened file, click the Hector icon the Hector icon on the status bar or run Code | Configure Current File Analysis ⌥⇧⌘H:

Hector the Inspector popup

Move the slider to one of the available positions:

  • None: turn off the highlighting completely

  • Syntax: show syntax problems only

  • Inspections (default): show syntax problems and inspection issues

Speed up indexing

Exclude directories and file types

Your project may contain folders with binaries, logs, or build artifacts, which do not affect AppCode 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: in the Project tool window, switch to the Files view, right-click the folder you want to exclude, and select Mark Directory as | Excluded.

Since the symbols from the excluded files remain uncompleted for AppCode, the following features are not available for such files: code completion and auto-import, code generation, Find in Path (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 Preferences | Editor | File Types:

Ignore files and folders

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. See this instruction for details on how to retrieve and send them.

Last modified: 20 May 2020