Results 1 to 7 of 7

Thread: Is there a way to make the DLL smaller?

  1. #1

    Is there a way to make the DLL smaller?

    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

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Is there a way to make the DLL smaller?

    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.

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #3

    Re: Is there a way to make the DLL smaller?

    Thanks, I use the newest AVIRA AntiVIR and thin_Inet.DLL pops up all the time when it is loaded.

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Is there a way to make the DLL smaller?

    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 :
    [code=thinbasic]
    %USEMACROS = 1
    [/code]

    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
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5

    Re: Is there a way to make the DLL smaller?

    Thanks for the hint, that reduced it by allready 3 kb.

  6. #6
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Is there a way to make the DLL smaller?

    You guys are amazing, squeezing size smaller and smaller, making code faster and faster.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Is there a way to make the DLL smaller?

    Quote Originally Posted by MikeHart
    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

    Ciao
    Eros

    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •