PDA

View Full Version : Slow program start if bundled



oli
03-12-2009, 15:25
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

Petr Schreiber
03-12-2009, 15:43
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

oli
03-12-2009, 16:05
Hi Petr,

you're right again :eusaclap:
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

Petr Schreiber
03-12-2009, 16:31
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.

Michael Hartlef
03-12-2009, 17:13
Petr,

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

Michael Hartlef
03-12-2009, 17:15
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?

Petr Schreiber
03-12-2009, 17:21
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.

Michael Clease
03-12-2009, 19:06
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

Michael Hartlef
03-12-2009, 21:45
That is a nice tip. Thanks Michael :eusaclap:

oli
04-12-2009, 10:06
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