Page 1 of 1

Optimizing/Profiling your modules

Posted: Wed Jan 16, 2019 2:58 am
by Cherry Garcia
You can profile your modules with a free program called Visual VM.
Download it here: https://visualvm.github.io/download.html

A. The only trick/caveat is to make sure to launch the profiler with the correct command line.

{PATH_TO_VISUAL_VM_BIN}\visualvm --jdkhome "{PATH_TO_YOUR_JDK}"

This would be something like this:

visualvm_142\bin\visualvm --jdkhome "c:\Program Files\Java\jdk1.8.0_131"

B. Launch Voltage Modular
C. Load your module
D. Profile
1. Click the local application (which will most likely be Voltage Modular)
2. Click "Sampler"
3. Click "CPU"

Now you are able to profile your module.
using-visual-vm-steps.png
using-visual-vm-steps.png (15.65 KiB) Viewed 18022 times
It allows you to see what functions are being executed and this will help to find bottlenecks or inefficient code.