On Fri, 14 Nov 2008 02:14:23 +0000 (UTC) John Reimer <[EMAIL PROTECTED]> wrote:
> Hello huurd, > > > I use dwt+dwtx, a hello word exe size is 22M, after I use upx the size > > is 800kb. > > > > exe file appears to be a lot of meaningless repeat, how to remove it? > > > > > 22M is distastefully huge for a hello world example using dwt and dwtx :(. > Like other's suggested, maybe debug info is getting compiled in due to a > -g switch. > > The file size still may end up being several megabytes, though, even without > the debug info. This is more of an annoyance, than a hindrance. DWT has > a lot to offer; so most people end up coping with the size issue, especially > if they know they can use something like upx to squeeze things tight. > > I can't exactly remember what the cause of this is, but I think it has > something > to do with scads of "hidden" D symbols (moduleinfo?) produced by the D > compiler > for projects that have a combination of (1) tons of modules and (2) many > interdependencies amongst modules such that even a small project ends up > linking in ALL (or nearly so) classes from the framework. This, > unfortunately, > is one of DWT's weaknesses. I wish the language could help DWT by fixing > that, but I don't know if that is possible. Other alternatives that might > help reduce the problem (I think) is integrating multiple modules into one > file...but that tends to hinder the whole idea of organization and namespace > clarity. If DWT were to do this, it would also break import compatibility > with SWT. There are a few reasons why this approach is not desirable. > > But I hear you. I really don't like unnecessary bloat either. It would > be great if we had some super smart tools that could pair things down a bit. > > -JJR > I use dsss 0.75 to build static dwt-win library. use dmd + gnu make to build binary. It's small binary size. only issue is it takes more times to build a static library. -- yidabu <[EMAIL PROTECTED]> http://www.dsource.org/projects/dwin D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/
