Matlab 6 (Rel.13) seems much faster. Anybody knows why?
Thanks,
Jim
I second it. I have been facing the same problems. On a "Fast"
machine a simple GUI takes upto 10-15 seconds to pop up.
I will appreciate any help/comments on this topic
If you do not need Java in your executable you can disable it. This
significantly reduces startup time: mcc -R nojvm ...
-Herbert
This seems to be an known problem, see the following link
<http://www.mathworks.com/support/solutions/data/1-T6Y3P.html?solution=1-T6Y3P>
The explanation (or performance) is far from satisfactory. I agree
that since the new version supports more functionalities, it may be
slower. However, if a program does not use these functions, the
compiler should be smart enough to include only relavent stuff, not
waste time.
We should challenge Mathwork to improve the performance. Too often we
find excueses for sloppy programming.
Jim
Mostly, we should encourage Mathwork to guives
as back, at least also, the version 3 compiler.
RE the encryption, TMW is responding to their customer's needs, and
so it is not a waste.
The instatiation time you're experiencing seems very excessive,
though. I have compiled GUIs with the new compiler without that
effect, but I may just be lucky.
Can you use an older version of the compiler? I don't remember if
that will compile GUIs. If not, you may want to readdress why you
need to compile your GUI. You may want to use p-code or you may want
to compile other parts of your code and not your GUI, or recreate
your GUI in another language like VC++ and call your MATLAB functions
that way. It's not hard to do.
I'm sure TMW will fix the problem shortly. They are spending a lot
of time and money on their compiler development and have come a long
way since v2.
I don't buy this. Some customer needs encryption, so everybody suffers
a slowdown ?
My two cents,
-rajeev-
Quote from the above link:
"Once started, your applications should run with a speed similar to the
uncompiled application in MATLAB."
I used to think there were 3 reasons people compile Matlab code:
1: ability to run application in a non-Matlab environment
2: ability to hide code from user
3: faster operation
Did #3 get thrown out the window ? Or has the interpreter speeded up
so much
that there is no longer a compile advantage ?
Now I'm curious : there's a bunch of folks following this thread and
interested in compiling their Matlab application. Could you share your
reasons for compiling with the group ?
Thanks,
-rajeev-
You are assuming that encryption is the problem. I doubt it is.
Many programs that do encryption on-the-fly are very fast and you
wouldn't likely see any performance hit, much less one on the order
of minutes. P-code, for instance, is encrypted and runs at least as
fast as m-code.
<snip>
> 1: ability to run application in a non-Matlab environment
This seems to currently be the primary purpose of the compiler. TMW
has switched their emphasis from producing C code and compiling it,
to making the universe of MATLAB functions compilable. With the high
cost of MATLAB, it is very desirable to be able to run your program
on a machine without a MATLAB license.
> 2: ability to hide code from user
As discussed above, a very valid purpose.
> 3: faster operation
>
> Did #3 get thrown out the window ? Or has the interpreter speeded
> up so much that there is no longer a compile advantage ?
I wouldn't say #3 was thrown "out the window," but maybe it's less of
a priority. Maybe that's why it's #3 and not #1 ;)
The interpreter did speed up dramatically with the introduction of
JIT and, as I mentioned above, TMW seems to have put more emphasis on
compiling all MATLAB functionality, something that was not possible
with v2, rather than faster excution with limited scope.
That is not the impression we get from the
numberous users complains on (and they often
restrict to that) start up time of compiled code.
On my side, I don't event want to hear about
something that forces us to deploy a ~100Mb
background to run a compiled code that can be
on the order of ~1 Mb.
I realy regret that, because at long as it lasts Matlab stoped as R13.