talk about dwt,jface executable size

torhu no at spam.invalid
Sat May 24 07:13:31 PDT 2008


yidabu wrote:
> dwt hello world size : 1.50 MB
> jface hello world size: 2.52 MB
> 
> the size is not too big!
> the main issue seems too long to build a static library by dsss, this may be a dsss issue.
> I hope that dmd 1.031 will fix the anonymous classe bug and we can use the -lib build flag to build a static dwt lib, dwtx.lib
> 
> tested with dwt-win svn, dwt-addons svn, dmd 1.028
> build dwt.lib and dwtx.lib by dsss 0.75
> testd on Windows XP
> 
> 
> dwt helloworld:
> 
> code:
> 
> import dwt.widgets.Display;
> import dwt.widgets.Shell;
> pragma(lib, "dwt.lib");
> pragma(lib, "dwtx.lib");
> void main ()
> {
>     auto display = new Display;
>     auto shell = new Shell(display);
>     shell.setText = "Hello DWT World ";
>     shell.open;
>     while (!shell.isDisposed)
>         if (!display.readAndDispatch)
>             display.sleep;
> 
>     display.dispose;
> }
> 
> build command:
> 
> dmd test.d dwt.res -L/SUBSYSTEM:windows:5 -L/rc:dwt.res -J..\dwt-samples\res -J..\dwt-addons\res -release
> 
> executable size:
> 1.50 MB
> 

I tried building this, and got a 1.39 MB exe.  It's still quite big.  My
DWT application is 1.64 MB, which I don't see as a major problem.  So
the size difference isn't huge between a minimal app and a real app.

I built DWT (rev. 211) with dsss, with oneatatime=yes and only '-O
-release', no inlining. Then I build the app using bud, with inlining
enabled.  I don't know how much the inlining matters, since building dwt
takes 35 minutes on my pc, I haven't bothered to test much.  So I'm
really looking forward to dmd 1.031, with a usable -lib switch.


More information about the Digitalmars-d-dwt mailing list