Results 1 to 10 of 10

Thread: Slow program start if bundled

  1. #1

    Slow program start if bundled

    Hi,

    Didn't see this problem mentioned yet in the forum:
    when I bundle some program and then launch it from the bundle, it takes a second or two, before the program is up & running (Laptop Core 2 Duo 2,66Ghz).
    While unbundled programs startup immediately.
    Is there anything I can tune when creating a bundle? I guess compression and obfuscated source add to the slow startup.

    Thanks,
    Oli

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

    Re: Slow program start if bundled

    Hi,

    I experience the same "thanks" to NOD32 antivirus, which keeps an eye on debundling too closely it hogs CPU up to 99%.
    When you execute bundle exe, it first extracs the bundled files to disk as hidden, and the launches the script.

    When I have AVG antivirus, the start was fast. Do you have NOD32 by any chance?


    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

  3. #3

    Re: Slow program start if bundled

    Hi Petr,

    you're right again
    NOD32 is installed, it's the office notebook so no chance to exchange for another antivirus
    Ok, at least when the program is started on another PC without NOD32 it will probably launch faster.

    Thanks again!

    Oli

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

    Re: Slow program start if bundled

    Yes,

    without NOD it was faster.
    But at least we know NO32 cares about us and tries to do its job

    Some of the ThinBASIC modules use concept of having built in DLL in memory, this approach would eliminate the need to extract to disk.

    But it would also mean major rewrite of the bundler; I am sure Eros is looking into this.
    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: Slow program start if bundled

    Petr,

    only the DLL doesn't have to extracted extra. The bundled module still has to be extracted.

  6. #6

    Re: Slow program start if bundled

    What you could do is to only bundle the scripts, but ship the modules unbundled in the same directory as the bundled exe. This way it should start faster, or?

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

    Re: Slow program start if bundled

    Hi Mike,

    yes. I wanted to say, that if the modules would be packed in resource the same way as auxiliary DLLs are in modules now, there would be no need for disk extraction in the debundler.

    Leave the DLL external is very good suggestion for now.
    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

  8. #8
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Slow program start if bundled

    Ive had this with McAfee, norton, avg, avast and they all suffer from the same problem its the dll's they are upx'd, what I do now is unpack all the dll's that are in the thinbasic folders.

    When they are bundled the file size is slightly bigger but its time to run is quicker.

    just edit the bat file to the correct path to thinbasic and it will do the job for you, make sure upx.exe is in the same folder as the bat file.

    Mike
    Attached Files Attached Files
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  9. #9

    Re: Slow program start if bundled

    That is a nice tip. Thanks Michael

  10. #10

    Re: Slow program start if bundled

    Thanks Michael, this really helps - bundles launch much quicker.
    The bundle itself is also upx packed - I tried to unpack it too but I didn't see any difference in launch time.

    Oli

Similar Threads

  1. Example: Section 4.3 (page 28), My First OGL Program (second program)
    By kryton9 in forum ThinBASIC programming in OpenGL/TBGL
    Replies: 2
    Last Post: 26-02-2010, 06:01

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
  •