Processes slowing way down...?

Hi Emily,

To identify what’s taking time in your scripts, you can use the Matlab profiler.
Before running the execution, type “profile on” (or add it at the top of your script).
After finishing, or at the end of your script, enter “profile viewer”. You’ll be able to navigate by execution time (search for functions with the highest “self time” and look for the red lines in the code).

Running multiple Matlab/Brainstorm in parallel does not always make things faster. Most Matlab functions are designed to run on all the cores available on your computer (open a resource monitor showing the activity of all the CPUs separately).

If you never reach a memory usage higher than 90% or 95% of you memory, it’s not a memory problem and it won’t help to clear variables from the memory. If your resource monitor can show the volumes of disk access, check it out for processes that take a long time. If there is a lot of reading on the hard drive (which is probably the case in a process that just detects maxima), running multiple tasks in parallel may slow down significantly: hard drives work faster when they have one task only to deal with.

Good luck
Francois