MATLAB: Does MATLAB start up slowly on Mac OS X 10.8.x the first time, but then quickly when started again

hangsinitsunvmjavamacMATLABprotectionslowsoftwaresophosstartuptimevirus

If I start up MATLAB for the first time since booting up my machine, it takes several minutes to get past the splash screen. If I then close MATLAB and start it up again, it starts up quickly.
If I start up MATLAB for the first time since booting up my machine from the terminal using the -nojvm option
matlab -nojvm
MATLAB starts up quickly.
How can I resolve this spurious behavior?

Best Answer

This behavior is caused by antivirus software scanning files that are run by MATLAB as it starts up. The antivirus software affirms the safety of the files run by MATLAB after its first start up, and then allows the files to run without a full analysis when they are run subsequently.
You can check if this is indeed the issue you are experiencing by temporarily disabling your antivirus software and starting up MATLAB for the first time since you booted your machine.
You can resolve this issue by editing the configuration of your antivirus software so that it does not perform on-access scanning of 'inside archives and compressed files'.