Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EiffelStudio: big .EXE file size

57 views
Skip to first unread message

Yosifov Pavel

unread,
May 14, 2011, 12:02:01 PM5/14/11
to
I tryed the last EiffelStudio on Windows Vista with MinGW: "Hello
world" program (.EXE file) is about 24Mb!! Does it possible to
optimize the size, some way to shrink generated .exe?..

/Pavel

Georg Bauhaus

unread,
May 16, 2011, 7:17:06 AM5/16/11
to

What amount of size reduction to you have in mind?
Typically sizes such as these mean that little dynamic
linking is requested.

Yosifov Pavel

unread,
May 16, 2011, 7:43:54 AM5/16/11
to
On May 16, 6:17 pm, Georg Bauhaus <rm.dash-bauh...@futureapps.de>
wrote:

I tried, for example SmartEiffel, and without dynamic linking (no any
DLL depends, simple .c and .h file were generated then I compiled them
by mingw gcc) - result is .EXE about 30-40Kb. The same "Hello world"
in EiffelStudio produces 24Mb .exe file, why?! I turned off all
checks, inlines - the same 24Mb. It's very-very strange for "Hello
world", isn't it?

Georg Bauhaus

unread,
May 16, 2011, 10:05:18 AM5/16/11
to

What do you see if you do the equivalent of:

$ ls -l EIFGENs/hello/F_code/hello
-rwxr-xr-x 1 vocal vocal 949135 2011-05-16 15:30 EIFGENs/hello/F_code/hello

# or, without dynamic linking,

$ ls -l EIFGENs/hello/F_code/hello
-rwxr-xr-x 1 vocal vocal 1152904 2011-05-16 15:37 EIFGENs/hello/F_code/hello

That's the the result of finalizing compilation.

After stripping, the latter file has a size of 819940 bytes;
it does seem to still depend on dynamic C libraries, though.

The size of 819940 is about the same size I get for a hello world
C++ program that is statically linked.

The (non-finalized) hello file in the top level project directory is
rather large, yes. Lots of information in there for the IDE I should
think.

Yosifov Pavel

unread,
May 17, 2011, 10:43:28 PM5/17/11
to
On May 16, 9:05 pm, Georg Bauhaus <rm.dash-bauh...@futureapps.de>

I created empty project in ES. Compiled and got (dir):

18.05.2011 09:41 <DIR> .
18.05.2011 09:41 <DIR> ..
18.05.2011 09:42 0 dir1
18.05.2011 09:40 49 729 precomp_base.melted
18.05.2011 09:40 25 409 210 t1.exe

Then I ran strip.exe (from MinGW):

18.05.2011 09:43 <DIR> .
18.05.2011 09:43 <DIR> ..
18.05.2011 09:42 447 dir1
18.05.2011 09:43 0 dir2
18.05.2011 09:40 49 729 precomp_base.melted
18.05.2011 09:43 24 057 856 t1.exe

Then I tryed optimization (Dead Code removing ON, inlining OFF,
asserts/checks OFF):

18.05.2011 09:46 <DIR> .
18.05.2011 09:46 <DIR> ..
18.05.2011 09:45 <DIR> C1
18.05.2011 09:42 447 dir1
18.05.2011 09:43 489 dir2
18.05.2011 09:46 0 dir3
18.05.2011 09:45 <DIR> E1
18.05.2011 09:45 8 091 Makefile
18.05.2011 09:45 5 157 Makefile.SH
18.05.2011 09:40 49 729 precomp_base.melted
18.05.2011 09:46 25 415 615 t1.exe
18.05.2011 09:45 1 t1.melted
18.05.2011 09:45 312 t1.res
18.05.2011 09:45 42 TRANSLAT

After freezing:

18.05.2011 09:49 <DIR> .
18.05.2011 09:49 <DIR> ..
18.05.2011 09:45 <DIR> C1
18.05.2011 09:47 470 dir1
18.05.2011 09:47 506 dir2
18.05.2011 09:47 924 dir3
18.05.2011 09:49 0 dir4
18.05.2011 09:45 <DIR> E1
18.05.2011 09:45 8 091 Makefile
18.05.2011 09:45 5 157 Makefile.SH
18.05.2011 09:40 49 729 precomp_base.melted
18.05.2011 09:46 25 415 615 t1.exe
18.05.2011 09:45 1 t1.melted
18.05.2011 09:45 312 t1.res
18.05.2011 09:45 42 TRANSLAT

So, t1.exe is all the time big...

Yosifov Pavel

unread,
May 17, 2011, 10:48:01 PM5/17/11
to
Wow!! I saw W_code, not F_code directory!
Georg, thank you very much! :)

/Pavel

0 new messages