www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dwt - jface executable size down from 14 MB to 3 MB

reply yidabu <yidabu.spam gmail.com> writes:
by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, jface
executable size down from 14 MB to 3 MB, and executable compile time down from
60 seconds to 9 seconds.

It's a great news for dwt fans!



-- 
yidabu <yidabu.spam gmail.com>
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/
May 22 2008
next sibling parent reply Frank Benoit <keinfarbton googlemail.com> writes:
yidabu schrieb:
 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, jface
executable size down from 14 MB to 3 MB, and executable compile time down from
60 seconds to 9 seconds.
 
 It's a great news for dwt fans!
 
 
 
wow, that is good news
May 22 2008
parent reply arnaud <arnaud.versini gmail.com> writes:
Frank Benoit a écrit :
 yidabu schrieb:
 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, jface 
 executable size down from 14 MB to 3 MB, and executable compile time 
 down from 60 seconds to 9 seconds.

 It's a great news for dwt fans!
wow, that is good news
But the exe works with DMD 1.030 and DWT/JFACE?
May 22 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
arnaud schrieb:
 Frank Benoit a écrit :
 yidabu schrieb:
 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, jface 
 executable size down from 14 MB to 3 MB, and executable compile time 
 down from 60 seconds to 9 seconds.

 It's a great news for dwt fans!
wow, that is good news
But the exe works with DMD 1.030 and DWT/JFACE?
DMD 1.029 and 1.030 do not work because they crash in anonymous classes. DMD 1.028 works.
May 22 2008
parent reply arnaud <arnaud.versini gmail.com> writes:
Frank Benoit a écrit :
 arnaud schrieb:
 Frank Benoit a écrit :
 yidabu schrieb:
 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, 
 jface executable size down from 14 MB to 3 MB, and executable 
 compile time down from 60 seconds to 9 seconds.

 It's a great news for dwt fans!
wow, that is good news
But the exe works with DMD 1.030 and DWT/JFACE?
DMD 1.029 and 1.030 do not work because they crash in anonymous classes. DMD 1.028 works.
But oneatatime is with DMD 1.030?
May 22 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
arnaud schrieb:
 Frank Benoit a écrit :
 arnaud schrieb:
 Frank Benoit a écrit :
 yidabu schrieb:
 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, 
 jface executable size down from 14 MB to 3 MB, and executable 
 compile time down from 60 seconds to 9 seconds.

 It's a great news for dwt fans!
wow, that is good news
But the exe works with DMD 1.030 and DWT/JFACE?
DMD 1.029 and 1.030 do not work because they crash in anonymous classes. DMD 1.028 works.
But oneatatime is with DMD 1.030?
No, it was about the DSSS option in the DSSS compiler profile.
May 22 2008
parent reply "Long Chang" <changlon gmail.com> writes:
Content-Disposition: inline

MjAwOC81LzIyIEZyYW5rIEJlbm9pdCA8a2VpbmZhcmJ0b25AZ29vZ2xlbWFpbC5jb20+OgoKPiBh
cm5hdWQgc2NocmllYjoKPgo+PiBGcmFuayBCZW5vaXQgYSDDqWNyaXQgOgo+Pgo+Pj4gYXJuYXVk
IHNjaHJpZWI6Cj4+Pgo+Pj4+IEZyYW5rIEJlbm9pdCBhIMOpY3JpdCA6Cj4+Pj4KPj4+Pj4geWlk
YWJ1IHNjaHJpZWI6Cj4+Pj4+Cj4+Pj4+PiBieSBzZXQgZHNzcyBvbmVhdGF0aW1lPXllcywgYW5k
IGJ1aWxkIHN0YXRpYyBkd3QubGliLCBkd3R4LmxpYiwgamZhY2UKPj4+Pj4+IGV4ZWN1dGFibGUg
c2l6ZSBkb3duIGZyb20gMTQgTUIgdG8gMyBNQiwgYW5kIGV4ZWN1dGFibGUgY29tcGlsZSB0aW1l
IGRvd24KPj4+Pj4+IGZyb20gNjAgc2Vjb25kcyB0byA5IHNlY29uZHMuCj4+Pj4+Pgo+Pj4+Pj4g
SXQncyBhIGdyZWF0IG5ld3MgZm9yIGR3dCBmYW5zIQo+Pj4+Pj4KPj4+Pj4+Cj4+Pj4+Pgo+Pj4+
Pj4KPj4+Pj4gd293LCB0aGF0IGlzIGdvb2QgbmV3cwo+Pj4+Pgo+Pj4+PiAgQnV0IHRoZSBleGUg
d29ya3Mgd2l0aCBETUQgMS4wMzAgYW5kIERXVC9KRkFDRT8KPj4+Pgo+Pj4KPj4+IERNRCAxLjAy
OSBhbmQgMS4wMzAgZG8gbm90IHdvcmsgYmVjYXVzZSB0aGV5IGNyYXNoIGluIGFub255bW91cyBj
bGFzc2VzLgo+Pj4gRE1EIDEuMDI4IHdvcmtzLgo+Pj4KPj4gQnV0IG9uZWF0YXRpbWUgaXMgd2l0
aCBETUQgMS4wMzA/Cj4+Cj4KPiBObywgaXQgd2FzIGFib3V0IHRoZSBEU1NTIG9wdGlvbiBpbiB0
aGUgRFNTUyBjb21waWxlciBwcm9maWxlLgoKCnN0aWxsIHRvbyBiaWcuCg==
May 23 2008
parent reply Frank Benoit <keinfarbton googlemail.com> writes:
Long Chang schrieb:
 still too big.
 
3 MB is without the use of UPX... however Who defines 'too big' ? What is the limit? What rules do you apply to find that number? If you have hundreds of source files (tango+dwt+dwtx) it cannot go into a 250k executable. So what is small enough for you? And why should you use JFace if you want a mini app? If you would use a java application that is based on JFace, you need the Java runtime + SWT libs + Jface libs + SWT DLLs/SOs. The compiled DWT binary has all the needed functionality in itself. SWT and JFace is not optimized for small D applications. As in SWT so are withing JFace many internal dependencies between the classes. So even the little HelloWorld will contain the biggest part of SWT or JFace. Perhaps DDL can be an option, if big parts of the code can be moved into external libs. But still i don't know if you would count that to the executable size. If you want to distribute your app as a small zip file, you would still need to put the libs into that zip.
May 23 2008
parent reply "Long Chang" <changlon gmail.com> writes:
Content-Disposition: inline

I think it's too big is because:
http://svn.dsource.org/projects/dwt/downloads/win32/examples/ .
all the examples of less than 300kb.
and http://hg.dsource.org/projects/dwt-samples examples size is between 2.5
~ 6m.
May 24 2008
next sibling parent John Reimer <terminal.node gmail.com> writes:
Hello Long,

 I think it's too big is because:
 http://svn.dsource.org/projects/dwt/downloads/win32/examples/ .
 all the examples of less than 300kb.
 and http://hg.dsource.org/projects/dwt-samples examples size is
 between 2.5
 ~ 6m.
Hmmm, that is a significant difference. And it doesn't look like those executables are compressed. Thanks for pointing this out. This bears some looking into to. -JJR
May 24 2008
prev sibling parent John Reimer <terminal.node gmail.com> writes:
Hello Long,

 I think it's too big is because:
 http://svn.dsource.org/projects/dwt/downloads/win32/examples/ .
 all the examples of less than 300kb.
 and http://hg.dsource.org/projects/dwt-samples examples size is
 between 2.5
 ~ 6m.
I looked into this. These are packed with ASPack 2.11 which causes most of them to be shrunk by about 75% or more. I'm testing ASPack on some of the Dwt 3.4M7 examples right now to see how small they get. -JJR
May 24 2008
prev sibling next sibling parent reply John Reimer <terminal.node gmail.com> writes:
Hello yidabu,

 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, jface
 executable size down from 14 MB to 3 MB, and executable compile time
 down from 60 seconds to 9 seconds.
 
 It's a great news for dwt fans!
 
 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/
Very strange. But I won't complain. :) So this happens with the most recent dsss in svn? -JJR
May 22 2008
parent Frank Benoit <keinfarbton googlemail.com> writes:
John Reimer schrieb:

 
 Very strange. But I won't complain. :)
 
 So this happens with the most recent dsss in svn?
 
 -JJR
 
 
I tested it with the 0.75 release.
May 22 2008
prev sibling parent reply John Reimer <terminal.node gmail.com> writes:
Hello yidabu,

 by set dsss oneatatime=yes, and build static dwt.lib, dwtx.lib, jface
 executable size down from 14 MB to 3 MB, and executable compile time
 down from 60 seconds to 9 seconds.
 
 It's a great news for dwt fans!
 
 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/
In what section do you put "oneatatime=yes"... I'm confused because in the past doing this made the compiletimes much longer. This is why oneatatime=off was originally suggested. I tested setting it to "yes" today and it made the compile time extraordinarily long again. Perhaps you are saying that the library takes a long time to compile, but the executable compile time is fast? -JJR
May 24 2008
parent yidabu <yidabu.spam gmail.com> writes:
On Sat, 24 May 2008 14:11:40 +0000 (UTC)
John Reimer <terminal.node gmail.com> wrote:

 In what section do you put "oneatatime=yes"... I'm confused because in the 
 past doing this made the compiletimes much longer.  This is why oneatatime=off 
 was originally suggested.
 
 I tested setting it to "yes" today and it made the compile time
extraordinarily 
 long again.  Perhaps you are saying that the library takes a long time to 
 compile, but the executable compile time is fast?
 
 -JJR
yes, once put "oneatatime=yes", library takes a long time to compile, even takes several hours to compile the dwt-addons svn, but the executable compile time is fast. -- yidabu <yidabu.spam gmail.com> 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/
May 24 2008