www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Size of executable almost triples

reply Stefan <Stefan.Liebig compeople.de> writes:
I recently had to fix a little bug in an D application (win32). I thought that
I would also be a good idea to upgrade to the most current version of the D
compiler.
When upgrading to 1.033 from 1.025 the executable size almost tripled from 227
kb to 603 kb! After building with all version from 1.025 up I found that this
phenomenon occurs when switching from 1.031 to 1.032.

Any ideas?

Stefan
Jul 29 2008
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Stefan" <Stefan.Liebig compeople.de> wrote in message 
news:g6n37d$2dhc$1 digitalmars.com...
I recently had to fix a little bug in an D application (win32). I thought 
that I would also be a good idea to upgrade to the most current version of 
the D compiler.
 When upgrading to 1.033 from 1.025 the executable size almost tripled from 
 227 kb to 603 kb! After building with all version from 1.025 up I found 
 that this phenomenon occurs when switching from 1.031 to 1.032.

 Any ideas?

 Stefan

Bearophile noticed this when 1.032 came out, too. There has not yet been any resolution as far as I know.
Jul 29 2008
prev sibling parent reply Moritz Warning <moritzwarning web.de> writes:
On Tue, 29 Jul 2008 08:42:21 -0400, Stefan wrote:

 I recently had to fix a little bug in an D application (win32). I
 thought that I would also be a good idea to upgrade to the most current
 version of the D compiler. When upgrading to 1.033 from 1.025 the
 executable size almost tripled from 227 kb to 603 kb! After building
 with all version from 1.025 up I found that this phenomenon occurs when
 switching from 1.031 to 1.032.
 
 Any ideas?
 
 Stefan

Is there a bug report already? I haven't found one yet. Such bloat is quite annoying. Btw., you can always use "strip <program>" to reduce the binary size. Or even upx.
Jul 29 2008
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
Moritz Warning:
 Btw., you can always use "strip <program>" to reduce the binary size. Or 
 even upx.

What strip do you use for this? The strip I use isn't compatible: strip:foo.exe: File format not recognized BFD header file version (GNU Binutils) 2.18.50.20080109 Bye, bearophile
Jul 29 2008
prev sibling next sibling parent Moritz Warning <moritzwarning web.de> writes:
On Tue, 29 Jul 2008 11:39:25 -0400, bearophile wrote:

 Moritz Warning:
 Btw., you can always use "strip <program>" to reduce the binary size.
 Or even upx.

What strip do you use for this? The strip I use isn't compatible: strip:foo.exe: File format not recognized BFD header file version (GNU Binutils) 2.18.50.20080109 Bye, bearophile

I'm on linux, works fine there.
Jul 29 2008
prev sibling next sibling parent reply Stefan <Stefan.Liebig compeople.de> writes:
Do you have a similar effect with Linux?
You mentioned strip, what does it exactly?

Stefan

Moritz Warning Wrote:

 On Tue, 29 Jul 2008 08:42:21 -0400, Stefan wrote:
 
 I recently had to fix a little bug in an D application (win32). I
 thought that I would also be a good idea to upgrade to the most current
 version of the D compiler. When upgrading to 1.033 from 1.025 the
 executable size almost tripled from 227 kb to 603 kb! After building
 with all version from 1.025 up I found that this phenomenon occurs when
 switching from 1.031 to 1.032.
 
 Any ideas?
 
 Stefan

Is there a bug report already? I haven't found one yet. Such bloat is quite annoying. Btw., you can always use "strip <program>" to reduce the binary size. Or even upx.

Jul 29 2008
parent Rakan Alhneiti <rakan.alhneiti nospam.gmail.com> writes:
Moritz Warning wrote:
 On Wed, 30 Jul 2008 02:11:27 -0400, Stefan wrote:
 
 Do you have a similar effect with Linux? You mentioned strip, what does
 it exactly?

Afaik, you can't link the binary afterwards or debug it properly, but that's often no problem for release builds. Anyway, it's not a workaround for the increased file size.

I ran into this problem earlier as i was developing IntelliD (which is not done yet!). The file size went up to 9 MB in size, i removed -g -debug symbols from my compilation command and i think it went down to 7 or 8 MB. Using UPX i managed to get it size my files down to 2.5 MB which is good enough for a text-editor.
Jul 30 2008
prev sibling parent Moritz Warning <moritzwarning web.de> writes:
On Wed, 30 Jul 2008 02:11:27 -0400, Stefan wrote:

 Do you have a similar effect with Linux? You mentioned strip, what does
 it exactly?
 

Afaik, you can't link the binary afterwards or debug it properly, but that's often no problem for release builds. Anyway, it's not a workaround for the increased file size.
Jul 29 2008