From: Mike Aubury <mike@au...> - 2010-01-27 09:45:28
Anyone got any ideas why a program I've compiled would be taking over 30
seconds to get to execute the "main()" ?
The code itself is fairly complex (when it gets going) - and the binary is
around 3Mb in size if that helps - but I dont think its the complexity that's
the issue - as I've said - its taking to time just to get to execute the code
The code uses a dll I've compiled using Mingw too - if thats significant...
If I compile a simple "hello world" type program - again using my dll - it
loads almost immediately
Any thoughts ?
From: Martin Prüsse <prusse.martin@gm...> - 2010-01-28 18:08:39
On Wed, Jan 27, 2010 at 7:45 AM, Mike Aubury <mike@...> wrote:
> Anyone got any ideas why a program I've compiled would be taking over 30
> seconds to get to execute the "main()" ?
Are you using C++? And you use static objects in your code? The constructor of
these objects need to be called prior to the "main()" if it involves remote data
access or lengthly computations you main function will realy take some time to
be called. You could try to place a break point in "__main"(I got the
in this function the constructors of the static objects are called and
stuff for them is set and after this jog is done it calls "main()". Maybe I got
something not rigth here, sorry it I got some name or something else wrong.