Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

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
    6,403
    Rep Power
    650

    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 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  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
    6,403
    Rep Power
    650

    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 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  5. #5
    Super Moderator Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Leverkusen, Germany
    Age
    48
    Posts
    3,151
    Blog Entries
    2
    Rep Power
    323

    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
    Super Moderator Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Leverkusen, Germany
    Age
    48
    Posts
    3,151
    Blog Entries
    2
    Rep Power
    323

    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
    6,403
    Rep Power
    650

    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 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  8. #8
    thinBasic MVPs Michael Clease's Avatar
    Join Date
    May 2007
    Posts
    1,414
    Blog Entries
    1
    Rep Power
    149

    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
    Why is the world full of nobs trying to push my buttons!!

    Home Desktop : WinXP Pro SP3 - 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 : WinXP Pro SP3 - Intel Pentium 4 - 3 Ghz - 512 MB - ATI Mobile Radeon 7000 IGP
    Work Desktop : WinXP Pro SP3 - Intel core 2 Quad Q8200 - 2.33 Ghz - 2 Gb - Quadro Fx 370

  9. #9
    Super Moderator Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Leverkusen, Germany
    Age
    48
    Posts
    3,151
    Blog Entries
    2
    Rep Power
    323

    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

Bookmarks

Posting Permissions

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