[Issue 2254] Size of executable almost triples

2012-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


Denis verylonglogin@gmail.com changed:

   What|Removed |Added

 CC||verylonglogin@gmail.com


--- Comment #35 from Denis verylonglogin@gmail.com 2012-04-16 16:35:54 
MSD ---
(In reply to comment #34)
 However, I'm not seeing the 5K-ish blocks of zero bytes that were present in
 2.057. I assume that the underlying DMD -lib bug (or wherever it was) has been
 fixed.
 

Looks like these blocks are related to Issue 7921.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2012-01-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WORKSFORME


--- Comment #33 from Walter Bright bugzi...@digitalmars.com 2012-01-31 
17:13:25 PST ---
For D1 1.073, 

  import std.stdio; void main() { writefln(hello world); }

generates an executable sized 117,276.

For D2 2.058,

  import std.stdio; void main() { writeln(hello world); }

generates an executable sized 146,972.

All on Windows compiled with -O -release -inline.

I think these sizes are reasonable, especially considering all that the runtime
library is expected to do (threads, gc, static construction, etc.).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #32 from Jacob Carlborg d...@me.com 2011-05-19 23:27:57 PDT ---
Is this only a problem on Windows?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


Heywood Floyd soul...@gmail.com changed:

   What|Removed |Added

 CC||soul...@gmail.com


--- Comment #19 from Heywood Floyd soul...@gmail.com 2011-05-19 02:31:56 PDT 
---
Hello world on Darwin with writefln(), -release:
1.068:  272 kb
2.053:  954 kb (!)

Hello world on Darwin with writefln(), -release, strip:
1.068:  252 kb
2.053:  894 kb (!)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #20 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
04:12:57 PDT ---
Created an attachment (id=981)
Size of phobos.lib across D1 versions

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #21 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
05:51:19 PDT ---
Created an attachment (id=982)
Size of Hello, world .exe across D1 versions

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #22 from bearophile_h...@eml.cc 2011-05-19 09:42:59 PDT ---
(In reply to comment #21)
 Created an attachment (id=982) [details]
 Size of Hello, world .exe across D1 versions

What's happened in DMD 1.032 and 1.035 to cause that size increase?
Is something similar happened to DMD2 too?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


Jacob Carlborg d...@me.com changed:

   What|Removed |Added

 CC||d...@me.com


--- Comment #23 from Jacob Carlborg d...@me.com 2011-05-19 11:46:12 PDT ---
As (In reply to comment #22)
 (In reply to comment #21)
  Created an attachment (id=982) [details] [details]
  Size of Hello, world .exe across D1 versions
 
 What's happened in DMD 1.032 and 1.035 to cause that size increase?
 Is something similar happened to DMD2 too?

As Walter always has said, compile something and look at the map file to see
what's pulled into the executable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #24 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
14:23:23 PDT ---
Created an attachment (id=983)
Treemap of map file of D 2.053 Hello, world

(In reply to comment #23)
 As Walter always has said, compile something and look at the map file to see
 what's pulled into the executable.

Map files are useless. Look at this treemap. Most functions in the large
rectangles contain very little code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #25 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
14:27:26 PDT ---
Created an attachment (id=984)
D 2.053 Hello, world executable opened in a file viewer

Look at this instead. There are many large areas in the executable filled with
zero bytes. If you compress the executables produced by a DMD version before
and after this regression, the compressed sizes will differ by very little.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #26 from bearophile_h...@eml.cc 2011-05-19 14:38:35 PDT ---
I suggest to compile a hello world with 1.031 and 1.032 and then compare in
some way their map files, and show the differences...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #27 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
14:46:57 PDT ---
(In reply to comment #26)
 I suggest to compile a hello world with 1.031 and 1.032 and then compare in
 some way their map files, and show the differences...

What do you hope to achieve by doing that? As I already said, this will not
answer any questions. This is not a dependency bloat problem! 

How would you do this, anyway? Those old DMD versions don't even have a -map
switch - the map file generated by OPTLINK by default is useless, it only lists
segments.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #28 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
15:00:45 PDT ---
Created an attachment (id=985)
Side-by-side comparison of cv2pdb+dumpbin-generated map files of DMD 1.031 and
1.032 Hello, world

This is interesting, but for unexpected reasons: the 5K blocks of fluff have no
debugging names. Could be a cv2pdb issue, or something else.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #29 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
15:33:16 PDT ---
The problem is caused by DMD's -lib option, used since 1.032 to build Phobos.
Previous versions used the Digital Mars librarian (lib.exe).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #30 from bearophile_h...@eml.cc 2011-05-19 15:38:42 PDT ---
(In reply to comment #28)

 the 5K blocks of fluff have no
 debugging names. Could be a cv2pdb issue, or something else.

Thank you for your work. From the comparison it seems those 5K blocks of fluff
are the main cause of binary size increase.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #31 from Vladimir Panteleev thecybersha...@gmail.com 2011-05-19 
15:39:29 PDT ---
Actually, I should add that the problem might not be with DMD's -lib option.
While it certainly is a completely different method of generating phobos.lib, I
should note that:
1) The 5K-ish blocks of zeroes are not present in phobos.lib (although we do
see a size increase in the chart I attached earlier)
2) UniLink will happily link D's .obj files + phobos.lib and create an
executable without these blocks of zeroes (and much smaller size).

Thus, the problem could very well be in OPTLINK.

So, here's your workaround for the time being: use UniLink.
Someone posted the config on the NG, I'll repost it here for convenience
(ulink.cfg):

-zsnn.lib
-LC:\dmd\windows\lib
-LC:\dm\lib
-Go

Adjust paths as necessary.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-05-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


Kuan Hsu nagahiro@gmail.com changed:

   What|Removed |Added

 CC||nagahiro@gmail.com


--- Comment #18 from Kuan Hsu nagahiro@gmail.com 2011-05-14 07:46:16 PDT 
---
(In reply to comment #17)
 (In reply to comment #16)
  (In reply to comment #15)
  ...
   See bug 5660.
  
  Since bug 5660 doesn't exist (yet), I assume you mean bug 5560.
 
 Yes, thank you (wishes for comment editing...)

(In reply to comment #3)
 (In reply to comment #1)
  So something bad definitely happened between 1.031 and 1.032.  Now, if 
  someone
  could be bothered to try building phobos 1.032 without the -lib switch and
  compare, that would be great.
 
 Yep, that did the trick. I've used the v1.031 makefile to build phobos from
 v1.032, using v1.032. Both phobos.lib and the built .exe file have the size
 from v1.031. It's definately the -lib switch that's causing the bloat.

Using V1.030's phobos.lib instead of V1.066, the hello world exe size is
116KB, so the issue is all about phobos.lib

Using V1.068, the original size of phobos.lib is 1545KB, trying rewrite
win32.mak(using lib.exe to make phobos.lib) to get new phobos.lib is 951KB, the
hello world exe size is 123KB

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-02-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


Steven Schveighoffer schvei...@yahoo.com changed:

   What|Removed |Added

 CC||schvei...@yahoo.com


--- Comment #15 from Steven Schveighoffer schvei...@yahoo.com 2011-02-11 
06:22:02 PST ---
I just discovered some interesting results when compiling with -lib and
unittests.

See bug 5660.

-lib definitely needs some work.  I hope this is something easy to fix, because
the perception is not good for outsiders.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-02-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #16 from Justin C Calvarese technocr...@gmail.com 2011-02-11 
13:30:20 PST ---
(In reply to comment #15)
...
 See bug 5660.

Since bug 5660 doesn't exist (yet), I assume you mean bug 5560.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2011-02-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #17 from Steven Schveighoffer schvei...@yahoo.com 2011-02-11 
14:40:13 PST ---
(In reply to comment #16)
 (In reply to comment #15)
 ...
  See bug 5660.
 
 Since bug 5660 doesn't exist (yet), I assume you mean bug 5560.

Yes, thank you (wishes for comment editing...)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2010-10-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #13 from Heinz Traub malagan...@yahoo.es 2010-10-04 12:56:05 PDT 
---
Please vote for this issue. It may give a higher priority and Walter might take
a look at this long term bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2010-10-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254


nfx...@gmail.com changed:

   What|Removed |Added

 CC||nfx...@gmail.com


--- Comment #14 from nfx...@gmail.com 2010-10-04 17:41:57 PDT ---
Those who are affected by this, be sure to check bug 4767.
Can pull in unrelated and unused modules from the standard library.
There's also bug 3214 which can double the size of debug executables.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2010-01-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #11 from Stefan Liebig stefanlie...@web.de 2010-01-28 04:23:33 
PST ---
The D app is used in production, so rebuilding with tango and/or D2 is simply
too risky. And yes, in our scenario size matters because the application gets
deployed and updated via the internet.
For DSL that wouldn�t be a problem but there are a lot of users that have
slower connecions e.g. GPRS mobile connections.

However, thanks for the advice of building the app without the lib - plan A
I will give it a try.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2009-11-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254



--- Comment #10 from to...@yahoo.com 2009-11-22 13:28:52 PST ---
Since I assume this is a long-term bug now that wrapping up D 2 has the main
focus, I'll post some tips and tricks.

If you are using D 1, you'll probably have better luck with Tango.  A hello
world program built with Tango is about half the size.  If you really want to
use phobos you can custom build it, see comment #1 and onwards.

I wonder what platform you're on if saving a few hundred kB of disk space is
important, though.

When that's said, if you use other libraries written in D, make sure you build
in one of two ways:

A) Build everything in one go, don't use .lib files.  Except for tango/phobos
and C libs.  This means using a build tool or script that hands all files to
dmd at once.  Very fast and simple build process.  Supported by
xfbuild/bud/dsss build tools.

B) Build .lib files of your library dependencies first, by handing one file at
a time to dmd, then running lib.exe to create a .lib file.  Supported by DSSS,
and possibly xfbuild.  Or you could use a makefile or whatever you prefer.

The *WRONG* way to build is as follows:

C) Build .lib files by handing all files to dmd at once.  Then build your app
(any way you like) and link to those .lib files.  Unless your exe uses
absolutely everyting defined in those libs, this causes a bloated executable. 
You end up getting more then a wanted, because this way of building causes fake
dependencies between modules.


If you want try A, I suggest having a look at xfbuild, it's very fast and
flexible.  Ask in the newsgroup D.learn if you need help with setting it all
up.
http://bitbucket.org/h3r3tic/xfbuild/wiki/Home

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2254] Size of executable almost triples

2009-02-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2254





--- Comment #8 from malagan...@yahoo.es  2009-02-16 11:48 ---
I just want to comment: The more symbols, the more exports you have...the more
file size you get. What i hate the most is that when you execute your program
it takes even more memory.

I did a simple Direct3D program that initialize device and shows absolutely no
stuff, just a blank screen. This program uses 9.5 MB in memory, and it does
nothing!


--