2016b exe size is too large

Hello All, I was currently using 2012b Matlab and built executables for the same. While I shifted to 2016b Matlab (due to the requirement of tools to run in Windows 10) I find that the executable sizes are quite large. 2012 — 540kB 2016 — 1.05MB
My question( as mentioned in comment 2) was is there any possibility of reducing the size of executable or does it matter on any other conditions due to which size cannot be reduced. Thank you in advance.

6 commentaires

Rik
Rik le 12 Déc 2017
And what is your question? You might also notice that R2016b is substantially faster with some functions. In some cases I've seen my code run 5 times faster.
Akshata M
Akshata M le 12 Déc 2017
I would like to know why is this happening? and also if I can do something to reduce the size of exe. I also find its comparatively not fast in running exe.
Thank you in advance.
Rik
Rik le 12 Déc 2017
It may be a doubling, but is a 500 kb increase really such a problem for you? I don't think there is a solution other that going back to R2012b, but someone might chip in to confirm or correct me.
Jan
Jan le 12 Déc 2017
1.05 MB does not sound large. The modern Matlab versions have more features, such that you can expect the size to grow.
But maybe you mean the creation of code for a micro controller. Than MBs still matter. So please explain the details.
Akshata M
Akshata M le 12 Déc 2017
Modifié(e) : Akshata M le 12 Déc 2017
The problem is I will have such 20+ executables that must be built. Even if there were one executable it would have been a concern due to double of size. 20+ executables creates lot of difference. I used deploytool to build the executable.
Jan
Jan le 12 Déc 2017
Sorry, Akshata M, the problem is still not clear: 20 files a 1 MB have 20 MB, instead of 10 MB when you use R2012b. Of course there might be any circumstances, where the additional 10MB matter, but this is not likely or clear. Please take the time to mention any details. Currently it is not even clear, what your question is.

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 12 Déc 2017
Modifié(e) : Jan le 13 Déc 2017

0 votes

I try to post an answer, although I'm not sure what the question is exactly:
As you have seen already, R2016b creates larger executable as R2012b. This can depend on the used compiler, so try MinGW, MSVC 2017 (plus patch) or WinSDK 7.1 (see Supported Compilers R2016b). Maybe the executables have different sizes, but you might need to provide the distributables also. But maybe the larger files are not caused by the compiler, but by Matlab itself. Then there is no option to decrease the file size magically. Either stay at R2012b or live with the larger files in R2016b.
[EDITED]
You can reduce the file size by including the required toolboxes only and exclude the redistributables. But the size of 1.05MB is such small, that I assume, that this is the necessary minimum already.
Try to create a minimal running example, e.g. only the creation of one figure, and compile it. Do you see an equivalent grow up of the executable from R2012 to R2016? Maybe it is a certain part of the code, which causes the growing and could be written in another way.

Catégories

En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange

Produits

Tags

Aucun tag saisi pour le moment.

Question posée :

le 12 Déc 2017

Modifié(e) :

Jan
le 13 Déc 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by