Page 1 of 2

Is the WindowLib splitted !?

Posted: Sun Mar 13, 2005 2:37 am
by Ralf
Hi Fred!
Today i noticed when using just only WaitWindowEvent(), this will add about 7 KB to an exe! Why is it so big? Possible the lib isnt spiltted yet? Will there be any other way to reduce the exe size? I know its not so important and its just only a question i would like to know. thanks and keep on your work!

Posted: Sun Mar 13, 2005 2:02 pm
by Fred
The window library is splitted but it does includes some workaround which adds some kb.. i bet it's the little price to paid for having correct event handling, especially size one.

Posted: Sun Mar 13, 2005 8:53 pm
by dagcrack
is 7kb that much now adays?
I mean.. Come on!

PB exes are already WAY too small and I love it, even that they might be getting bigger and bigger on newer versions :shock:

Posted: Sun Mar 13, 2005 9:43 pm
by Psychophanta
dagcrack wrote:is 7kb that much now adays?
Of course. 1 bit is too much if it is a surplus :!:

Posted: Sun Mar 13, 2005 10:35 pm
by Fred
There is no surplus, i can assure you.

Posted: Sun Mar 13, 2005 11:01 pm
by traumatic
Psychophanta wrote:
dagcrack wrote:is 7kb that much now adays?
Of course. 1 bit is too much if it is a surplus :!:
If 7kb is too much for your liking, don't use OpenWindow() but use the API
commands instead. Of course you'll have to take care for proper event-handling
on your own then. This will save you quite some kilobytes.
(BTW: Same goes for MessageRequester() / 3.5kb vs. MessageBox_() / 2.5kb)

Posted: Mon Mar 14, 2005 12:11 am
by freak
7kb is the price to pay for M$ having a quite weird way of handling their event messages :D

Posted: Mon Mar 14, 2005 1:49 am
by Ralf
even if some libs will always be splitted, i dont understand that those commands link more to the exe as using just the plain api, like:

MessageRequester() ./. MessageBox_()
Delay() ./. Sleep_()

and some other things. can someone explain this, maybe fred? would be nice to know... (i still think some debugger routines could be linked to the final version and so it will add some more KB as using plane api functions!?

Posted: Mon Mar 14, 2005 3:37 am
by freak
Come on, this is paranoid. There are 250gb drives in even the cheapest computers today, so who will a few kb hurt :?:

Well, but since you ask:

Sleep and delay are the same. Did you try this? I get the exact same size, no matter which i use.

MessageRequester()
There is extra code, yes. It is because on windows, while a requester is open,
all windows except the foreground one are still able to receive events.
(That's because it is designed that you handle events for these windows in a callback)
Well, in PB, you don't have to use a callback, which is good, and btw also how
it is on all other platforms.
To do this, there is a routine to disable/enable these windows while the requester
is open.

I am not going to explain the reasons why we added some extra code
to some of the 700+ pb commands.. i hope you understand that.

We add extra code wherever it is neccesary to make live easier. That's
the whole concept of PB. If you don't like that, don't use the PB commands.
There is always the api way.

> (i still think some debugger routines could be linked to the final version and so it will add some more KB as using plane api functions!?

We're not dumb btw. :wink:

Posted: Mon Mar 14, 2005 3:48 am
by dagcrack
Agreeing with PB Developers, this guys ARE Paranoid, go work in assembler if you don't want those 7kb or 1kb or 1byte more or less.

THATS ALL ! jesus

Posted: Mon Mar 14, 2005 5:23 am
by fsw
Search for gui toolkits on the web and find one that is smaller than purebasic's.
dagcrack wrote: Agreeing with PB Developers, this guys ARE Paranoid, go work in assembler if you don't want those 7kb or 1kb or 1byte more or less.
I second that.
.
BTW
You could go with c--, use wxcmm as gui-toolkit, it can create pretty small exe's too.
But it's not a Basic style language, it's a mixture of c and asm.

Posted: Mon Mar 14, 2005 9:26 am
by Fred
Hey, there is of course no debug routines left in the final executable, come on ! About the extra size, Fr34k explained it, PB doesn't do only API wrapping, there is some extra code sometimes ;)..

Posted: Mon Mar 14, 2005 9:33 am
by Psychophanta
Well, traumatic and others, I (we) don't say not to more final .exe sizes, but not to more .exe sizes if it is a surplus, am i correct explain now?
Fred and Timo understand it perfectly, because it is one of the PB policies. Fred and Timo assure there is not a surplus size if we want to use the weird (incoherent i'd call it) MS stablished event handler. And of course, i strongly trust and believe on Fred and Freak (Timo), :)

Posted: Mon Mar 14, 2005 2:01 pm
by Kale
he he, these posts seem to crop up once in a while and they always make me chuckle. :) Only PB developers have this new condition that Fred & Co. has created called 'No-Bloat Addiction' or 'Kilobyte Anorexia'. :lol: :wink:

Posted: Mon Mar 14, 2005 2:42 pm
by Fred
:lol: