View Full Version : Is there a way to make the DLL smaller?
Michael Hartlef
27-02-2007, 20:29
Hi folks,
I noticed that the modules that ship with thinBasic are mostly small in size. I have now 32kb with just 5 functions in the Joystick module. Did you UPX them or are they just that small. Or is there a setting to tell PowerBasic to produce smaller code?
Michael
ErosOlmi
27-02-2007, 20:34
We use UPX everywhere.
We tested it under many OS with no errors even if DEP is on.
Maybe few sporadic AV false positive but on old AV software.
Michael Hartlef
27-02-2007, 20:37
Thanks, I use the newest AVIRA AntiVIR and thin_Inet.DLL pops up all the time when it is loaded.
Petr Schreiber
27-02-2007, 22:00
Hi Mike,
you might find it weird, but PowerBASIC compiles all the functions, even if you don't use them.
For example, if you use :
%USEMACROS = 1
you will get some size reduction, if you use win32api.inc.
Why ? Function definitions are replaced with macros, which are compiled only when referenced.
Size of exe really depends on coding style, for example see SELECT CASE optimizations in help file.
Maybe you are scared the size jumped so fast to 32kB, but I think it will take time to get to 100kB for example.
Bye,
Petr
Michael Hartlef
27-02-2007, 22:02
Thanks for the hint, that reduced it by allready 3 kb. ;)
You guys are amazing, squeezing size smaller and smaller, making code faster and faster.
ErosOlmi
28-02-2007, 00:12
Thanks, I use the newest AVIRA AntiVIR and thin_Inet.DLL pops up all the time when it is loaded.
Mike, I think this is more related to the fact that thinBasic_Inet.dll try to connect to internet rathan than other things.
I do not know if you use ZoneAlarm. ZoneAlarm intercept everything that try to execexute another process. For example when thinAir execute a script this is intercepted by ZoneAlarm and you have to authorize it to do that (only once or forever). If you tell ZoneAlarm to do it forever, than ZoneAlarm storeres a MD5 hash key to check if thinAir will change in future. So when I recompile thinAir, ... ZoneAlarm ask again to authorize it because hash value has changed.
To make it short, ... you can trust thinBasic_Inet.dll.
It will do only things asked by the script using it :D
Ciao
Eros