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.
C:\Program Files
(x86)\Microchip\MPLABX\vx.xx\mplab_platform\etc
C:\Program Files\Microchip\MPLABX\vx.xx\mplab_platform\etc
/opt/microchip/mplabx/vx.xx/mplab_platform/etc
/Applications/microchip/mplabx/vx.xx/Contents/Resources/mplab_platform/etc
where vx.xx
is the MPLAB X IDE version.
The following line contains the default values:
default_options="-J-Dnb.FileChooser.useShellFolders=false -J-Dcrownking.stream.verbosity=very-quiet -J-Xms256m -J-Xmx512m -J-XX:PermSize=128m -J-XX:MaxPermSize=384m -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled"
The bolded areas are:
-Xms256m
tells the JVM to start with at least 256
MB for the heap.
-Xmx512m
tells the JVM to allocate as much as 512
MB for the heap, but no more.
-XX:PermSize=128m
tells the JVM to allocates 128
MB for space needed to keep track of additional data that does not go on the heap.
-XX:MaxPermSize=384m
tells the JVM to allocate no
more than 384 MB for the additional data that does not go on the heap.
You should not need to modify the PermSize or the MaxPermSize unless you
get the error java.lang.OutOfMemoryError: PermGen space
.
In general, the most important area is -Xmx512m
; 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 for MPLAB 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 512 MB unless you change the value in
mplab_ide.conf
. It is recommended that you change the
-Xmx512m
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: