Jump to page: 1 26  
Page
Thread overview
What can be done to reduce executable size?
Dec 10, 2011
Bane
Dec 10, 2011
Mirko Pilger
Dec 10, 2011
Bane
Dec 10, 2011
David Nadlinger
Dec 10, 2011
Bane
Dec 10, 2011
Bane
Dec 10, 2011
Andrej Mitrovic
Dec 10, 2011
Bane
Dec 10, 2011
Trass3r
Dec 10, 2011
Trass3r
Dec 10, 2011
Bane
Dec 10, 2011
Trass3r
Dec 10, 2011
Mehrdad
Dec 10, 2011
Trass3r
Dec 10, 2011
Mehrdad
Dec 10, 2011
Trass3r
Dec 10, 2011
Mehrdad
Dec 10, 2011
Trass3r
Dec 11, 2011
Nick Sabalausky
Dec 10, 2011
Trass3r
Dec 10, 2011
kenji hara
Dec 12, 2011
Martin Nowak
Dec 12, 2011
Trass3r
Dec 10, 2011
RivenTheMage
Dec 11, 2011
Jacob Carlborg
Dec 11, 2011
Adam Ruppe
Dec 11, 2011
Jonathan M Davis
Dec 12, 2011
Jacob Carlborg
Dec 12, 2011
Andrea Fontana
Dec 14, 2011
Martin Krejcirik
Dec 14, 2011
bearophile
Dec 14, 2011
Jacob Carlborg
Dec 16, 2011
Jonathan M Davis
Dec 16, 2011
Jonathan M Davis
Dec 16, 2011
Adam D. Ruppe
Dec 16, 2011
Adam D. Ruppe
Dec 16, 2011
Jonathan M Davis
Dec 16, 2011
Adam D. Ruppe
Dec 16, 2011
Jonathan M Davis
Dec 16, 2011
Sean Kelly
Dec 16, 2011
Sean Kelly
Dec 16, 2011
Sean Kelly
Dec 16, 2011
Jonathan M Davis
Dec 16, 2011
bearophile
Dec 16, 2011
Trass3r
Dec 16, 2011
Trass3r
Dec 16, 2011
bearophile
Dec 16, 2011
Trass3r
Dec 16, 2011
Sean Kelly
December 10, 2011
Short term and long term suggestions ? Anything we can do ? I heard it is some problem with linking dead code?



import std.stdio;
int main(){
  writefln("Hello Bloat!");
  return 0;
}

dmd -release -O hello.d

On Windows:
v1.071 = 339 Kb
v2.056 = 1017 Kb

It looks very ugly and might distract some people.
December 10, 2011
> On Windows:
> v1.071 = 339 Kb
> v2.056 = 1017 Kb

  v2.057b= 840 kb (upx --best = 151 kb)

December 10, 2011
Mirko Pilger Wrote:

> > On Windows:
> > v1.071 = 339 Kb
> > v2.056 = 1017 Kb
> 
>    v2.057b= 840 kb (upx --best = 151 kb)
> 

That is improvement. 2.07 is not released yet ?
And I don't think UPX is solution. It makes things look even worse, like too much makeup on ugly chick.
December 10, 2011
On 12/10/11 4:55 PM, Bane wrote:
> That is improvement. 2.07 is not released yet ?

Yeah, 2.057 is still in beta (expect a release during the next few days, though). It has some Phobos/druntime changes geared specifically towards reducing executable size.

David

December 10, 2011
Is it possible to move  phobos or runtime to shared lib ? It would reduces code significantly.
December 10, 2011
I am dealing with scenario of large numbers of programs written in D placed on same host/1 installer, when it all sums up size does matters.

> Is it possible to move  phobos or runtime to shared lib ? It would reduces code significantly.

December 10, 2011
Try using the unilink linker:

ftp://ftp.styx.cabel.net/pub/UniLink/

Get ulnb0329.zip

You have to configure ulink.cfg to this:
-zsnn.lib
-LC:\dmd\windows\lib
-LC:\dm\lib
-Go

-zkernel32;advapi32;user32;wsock32;shell32;snn.lib
-LC:\dmd2\windows\lib
-Go

Then linking is just: ulink <file1>.obj <file2>.obj <lib>.obj etc..
December 10, 2011
Am 10.12.2011, 17:17 Uhr, schrieb Bane <branimir.milosavljevic@gmail.com>:

> Is it possible to move  phobos or runtime to shared lib ? It would reduces code significantly.

Theoretically but there are some hurdles (esp. regarding the runtime/gc).
Some people have already tried this (on Linux of course), I'm not sure what the current status is.
December 10, 2011
> Short term and long term suggestions ? Anything we can do ? I heard it is some problem with linking dead code?

Well most space is covered by the runtime, TypeInfo and stuff like struct .init data.

Use http://thecybershadow.net/d/mapview to get a graphical view of your app.
E.g. on Linux it sometimes shows Afterpadding way too large.
December 10, 2011
Trass3r Wrote:

> > Short term and long term suggestions ? Anything we can do ? I heard it is some problem with linking dead code?
> 
> Well most space is covered by the runtime, TypeInfo and stuff like struct .init data.
> 
> Use http://thecybershadow.net/d/mapview to get a graphical view of your
> app.
> E.g. on Linux it sometimes shows Afterpadding way too large.


Yes, I use it, great piece of work.
« First   ‹ Prev
1 2 3 4 5 6