6.5.3 Speed Up MPLAB X IDE

If MPLAB X IDE is operating too slowly, consider the suggestions in the follow sections.

Increase the Computer Heap

You can modify the amount of memory allocated to MPLAB X IDE in the file mplab_ide.conf. We recommend you back up this file before you start editing it. If you change the contents of this file, the changes will be operative the next time you run MPLAB X IDE.

  • Windows OS - C:\Program Files\Microchip\MPLABX\vx.xx\mplab_platform\etc
  • Linux OS - /opt/microchip/mplabx/vx.xx/mplab_platform/etc
  • macOS - /Applications/microchip/mplabx/vx.xx/Contents/Resources/mplab_platform/etc

where vx.xx is the MPLAB X IDE version.

The following line contains the current default values, formatted for ease of reading:

default_options="-J-Dmymicrochip.connect=false 
                 -J-Dstatistics.connect=false 
                 -J-Dprism.allowhidpi=false 
                 --branding mplab 
                 -J-Dcrownking.stream.verbosity=very-quiet 
                 -J-Xss2m -J-Xms256m -J-Xmx4026m 
                 -J-Dapple.awt.graphics.UseQuartz=true 
                 -J-XX:+UseConcMarkSweepGC 
                 -J-XX:+CMSClassUnloadingEnabled 
                 -J-Dapt.limit.expanded.params=1000 
                 -J-Dplugin.manager.check.interval=EVERY_STARTUP 
                 -J-Dsun.java2d.noddraw=true 
                 -J-Dorg.netbeans.modules.extbrowser.UseDesktopBrowse=true 
                 -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade"

The bolded areas are:

-Xms256m Tells the JVM to start with at least 256 MB for the heap.
-Xmx4026m Tells the JVM to allocate as much as 4026 MB for the heap, but no more.

In general, the most important area is -Xmx4026m; this limits the maximum amount of heap that MPLAB X IDE will use. It might seem that having a large amount of heap could be helpful. However, memory used forMPLAB X IDE means less memory for other applications and system functions.

You can monitor how much memory the IDE is using by enabling the Memory monitor. Either right click on an empty space in the toolbar area and select memory, or select View > Toolbars > Memory.

The upper number will not go above 4026 MB unless you change the value in mplab_ide.conf. It is recommended that you change the value by setting in 128 MB increments. If you have a lot of memory, you can increase it by more than 128 MB, but make sure you leave enough memory for the rest of the system.

Change Debug Window Usage

If using debug tools slows down MPLAB X IDE, try the following:

  • Only display windows you need to view. The MPLAB X IDE debugger will examine each open window when a debug tool is used.
  • Reduce updates in the Stack window during debug stepping. In the Tools > Options (MPLAB X IDE > Preferences in macOS) window, Embedded > Generic Settings, check Disable auto refresh for call stack view during debug sessions and On mouse over structure and array expressions, evaluate integral members only.