What happens ?

Just starting out? Need help? Post your questions and find answers here.
infratec
Always Here
Always Here
Posts: 7604
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

What happens ?

Post 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
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: What happens ???

Post 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.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Re: What happens ???

Post 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.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: What happens ???

Post 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 ;)
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: What happens ???

Post 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.
oh... and have a nice day.
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: What happens ???

Post by utopiomania »

Why are you unhappy about this? Is 0.05Mb instead of 0.025Mb going to be a problem to your users? Why :?
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post 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.
oh... and have a nice day.
infratec
Always Here
Always Here
Posts: 7604
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: What happens ???

Post 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
User avatar
dhouston
Enthusiast
Enthusiast
Posts: 430
Joined: Tue Aug 21, 2007 2:44 pm
Location: USA (Cincinnati)
Contact:

Re: What happens ???

Post 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.
Fred
Administrator
Administrator
Posts: 18178
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: What happens ???

Post by Fred »

Yes, it's the 2D drawing which is must more advanced than before.
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: What happens ?

Post by Thorium »

If you want your exe to be smaler you can use a exe compressor like UPX: http://upx.sourceforge.net/
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: What happens ?

Post 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 :(
Image
Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

Re: What happens ?

Post 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)
UserOfPure
Enthusiast
Enthusiast
Posts: 469
Joined: Sun Mar 16, 2008 9:18 am

Re: What happens ?

Post 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.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: What happens ?

Post 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 :)
Image
Post Reply