"Arda " <firstname.lastname@example.org> wrote in message <email@example.com>... > > Less than 3 seconds. > > > > Opening Matlab has nothing to do with execution, since the application supposes to work on the computer without Matlab. But "the first time"I meant the very first time a newly compiled program is launched, where it needs to unpacked the files and store it somewhere. All successive runs takes 3 seconds - regardless whereas the computer is just restarted or not and Matlab is opened or not. > > > > It cant be, shouldnt be! Even the following simplest gui takes 20 seconds to display 'started' when executed for the first time after a restart. Once it starts, speed is pretty much the same for rest (with the case running through Matlab). But if I try again before restarting the computer it takes only 1 or 2 seconds to display 'started'. Unlike yours however, when i restart the computer and try again, i have to wait 20 seconds again! And i must say, my processor is i7..
This is a known issue with Matlab-compiled applications. In R2011b this problem is supposed to be reduced. But the core issue of having to unpack and load the MCR the first time it is used after a computer restart remains painful. In some cases I observed start-up times of up to a minute (obviously this depends on the specific hardware and CPU load).
The work-around that I have successfully used is to create a small wrapper application that simply displays a static "Please wait... Loading XYZ..." splash image (with a generic configuration of the image, size, etc.), then launches the main (compiled) application, and finally deletes the splash image when it detects that the main application has actually started. This gives the user an immediate feedback that the application is loading and this seems to resolve the issue. Anyone wishing to have this wrapper application, please contact me offline (altmany at gmail dot com).