How to reduce QT startup time when using DLL

My program depends on several DLLs at startup, including QtCore4.dll and QtGui4.dll from QT itself and ni488.dll from National Instruments. When I try to use any of the functions in cbw32.dll (a 5 MB file found in UniversalLibrary at http://www.mccdaq.com/software.aspx ), my program suddenly takes 5+ seconds to run, whereas before he did it instantly. Is there anything I can do to reduce the time it takes to run? In this case, what happens during this time, is the OS actively binding functions, or just trying to find a DLL? Is there a way to reduce the size of the DLL to include only material related to my project? Or include this information in the executable itself (static links, in other words)?

EDIT: DLL loading in parallel is a really good suggestion (and a method that I will use in the future), but does not understand what I consider the main problem here. Having a 5 MB DLL takes 5 seconds to load, it seems excessive, and for me this indicates a deeper problem. Are my expectations here, and is this loading time normal? Or is there really something wrong (and if so, what should I look at)?

+1
source share
2 answers

Why not load this dll dynamically in a parallel thread at startup?

HINSTANCE hGetProcIDDLL = LoadLibrary(L"library.dll");

Here is a good example.

+3
source

. 5+ , - . , cbw32 , , DllMain. , //, .

- /DELAYLOAD cbw32.dll, , ...

+1

All Articles