Page 1 of 2

What happens ?

Posted: Fri Nov 27, 2009 5:04 pm
by infratec
Hi,

not really a coding question, but I don't know where else I should place this question.
Because it is also not a bug. So maybe I'm doing something wrong:

When I create an .exe from my code in 4.31 the codesize is 23029 bytes or so.
When I create the same exe with 4.40b7 the codesize is 47104 bytes.

Is this true ???

An unhappy :cry:

Bernd

Re: What happens ???

Posted: Fri Nov 27, 2009 6:04 pm
by eesau
It is probably because of the new 2DDrawing library, BUT I think 47104 bytes is still extremely minimal in size. So nothing to worry about.

Re: What happens ???

Posted: Fri Nov 27, 2009 6:05 pm
by Foz
that depends on what you are doing. The graphics backend has been rewritten, so yes, file size might increase, but we can now use alpha blended images.

Re: What happens ???

Posted: Fri Nov 27, 2009 8:01 pm
by c4s
I think I read somewhere that from one beta to another the filesize for the drawing library got a bit smaller again...Anyway it shouldn't be the biggest problem for us ;)

Re: What happens ???

Posted: Fri Nov 27, 2009 8:13 pm
by Kaeru Gaman
who said he is using the drawing lib anyways?

@infratec

I could also guess you compile the bigger one with debugger support...
more info would help to find the reason.

23K is not so much for an exe, perhaps you could post the complete code.

Re: What happens ???

Posted: Fri Nov 27, 2009 8:32 pm
by utopiomania
Why are you unhappy about this? Is 0.05Mb instead of 0.025Mb going to be a problem to your users? Why :?

Posted: Fri Nov 27, 2009 8:36 pm
by Kaeru Gaman
I would also be curious why the same code compiles to over 200% of the old size...

... no, I am curious!

@Bernd

pse provide more info...
check if you compile one with XP-skin support and the other without...
do you use any screen thingies?
4.40b7 uses DirectX9 for default subsystem, means it uses completely different libs.

Re: What happens ???

Posted: Fri Nov 27, 2009 9:39 pm
by infratec
Hi,

it is not the absolute size which makes me wonder.
It is the increase of 100% like Kaeru already said.

Here is the source:
http://www.purebasic.fr/english/viewtop ... 14&t=40098

Yes, it uses 2DDrawing functions.

If the increase is only once (20k) than it is ok.
But since I have not checked larger sourcecodes, I don't know if it growth
proportional.

But in the moment I'm very busy, so I have not the time to investigate this now.
(I try to port the libdmtx stuff to PureBASIC)

Bernd

Re: What happens ???

Posted: Fri Nov 27, 2009 11:44 pm
by dhouston
My app, which uses no 2DDrawing, went from 271kB to 269kB so I think the 2DDrawing must be the cause of your app's growth.

Re: What happens ???

Posted: Sat Nov 28, 2009 11:22 am
by Fred
Yes, it's the 2D drawing which is must more advanced than before.

Re: What happens ?

Posted: Sat Nov 28, 2009 12:56 pm
by Thorium
If you want your exe to be smaler you can use a exe compressor like UPX: http://upx.sourceforge.net/

Re: What happens ?

Posted: Sun Nov 29, 2009 3:51 am
by moogle
Thorium wrote:If you want your exe to be smaler you can use a exe compressor like UPX: http://upx.sourceforge.net/
Whenever I compile a PB app, UPX always fails to compress it for some reason :(

Re: What happens ?

Posted: Sun Nov 29, 2009 5:08 am
by Matt
moogle wrote:
Thorium wrote:If you want your exe to be smaler you can use a exe compressor like UPX: http://upx.sourceforge.net/
Whenever I compile a PB app, UPX always fails to compress it for some reason :(
You just can't beat the size of PureBasic's compiled apps 8)

Re: What happens ?

Posted: Sun Nov 29, 2009 9:14 am
by UserOfPure
moogle wrote:Whenever I compile a PB app, UPX always fails to compress it for some reason :(
You're doing something wrong, then. All PB apps compress quite well, like any normal exe.

Re: What happens ?

Posted: Sun Nov 29, 2009 9:24 am
by moogle
UserOfPure wrote:You're doing something wrong, then. All PB apps compress quite well, like any normal exe.
Sure...

How can I do it wrong with a frontend?

How do you do it then?

I even tried via command line upx.exe -4 file.exe and it fails

However if I'm doing it so wrong you wouldn't mind compressing it for me then would you? Doubt that you can :)