Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an ideal size for executable modules on Windows?

I've been taking note of the .exe file size of many applications.

I saw that Visual Studio 2005 has an .exe size of 453KB, and VS2008 of 1.04MB because they divide the application into many parts (.exe + many .dll files).

I saw also that MS Outlook has a very large .exe file (11.8MB) while MS Word is very small (398KB)!

After pondering the things that I had seen, I was left with these questions:

  1. Is there an advantage to having a small .exe, even if the final size of the application (all DLLs loaded) is much larger?
  2. And if so, at what size is it good to begin breaking up an application into separate modules?
like image 739
Wael Dalloul Avatar asked Aug 16 '09 11:08

Wael Dalloul


People also ask

What is the average size of executables that you have created?

On average, the executables are about 2MB of size, from version 1.9. x (for the code above).

How big can an EXE be?

Having a self extracting executable larger than 4GB is on the extreme side, since there's a 4gb limit on Windows executable files like *.exe, *. dll etc.

What determines the size of an executable?

Apparently the most significant factor is the number of bytes the compiler writes out to the resulting file. Basically what you're asking is: "What does my binary executable actually contain?"

What will be the size of the executable file of C?

The answer to this particular question (about compiler executable file sizes) appears to be no, the cl.exe executable in Visual Studio is ca 380 kB, the g++ executable in Linux is ca 1.1 MB and the clang executable in Linux is ca 30 MB.


2 Answers

A large executable probably has less less shared libraries (less re-usable code), meaning that the application probably is more memory intensive than an application using shared libraries. If you want a system with minimal memory footprint you want shared libraries.

A big exe is likely to be more self-contained, which might make it easier to keep a stable deployment.

like image 176
krosenvold Avatar answered Sep 17 '22 18:09

krosenvold


As a general rule, big size exe may mean you collect all the dependencies in single file so no dependency problem like dll hell but every time you want to fix any thing in small module the user has to download this big exe!!!

On the other hand small exe it may mean you modularize your application to different modules so it is easy to maintain and upgrade these modules separately and user does not have to download the big chunk exe

like image 41
Ahmed Avatar answered Sep 18 '22 18:09

Ahmed