PDA

View Full Version : Application Launch Extremely Slow



SKolaMunn
27th October 2010, 18:14
I'm using QT 4.6.3 with dlls compiled for Microsoft Visual Studio 2008. I've found that my application takes a very long time to launch. Its a fairly complex (multiple windows, video capabilities, used lots of third-party libraries) collection of code but after using QTime and putting in some "cout" statements, I've found that the delay in launching my application (10-12 seconds between when .exe is double-clicked to when QMainWindow GUI appears) occurs entirely in the line:

QApplication a(argc,argv);

This line takes 10-12 seconds to execute. I've tried:

QApplication* a = new QApplication(argc,argv)

just to see if it would be faster but same thing. I'm not passing any arguments in, so argc=1 and argv=00581F10 (when passed to std::cout). I've also tried:

char *argv2[] = {"a", NULL};
int argc2 = sizeof(argv2) / sizeof(char*) - 1;
QApplication a(argc2,argv2);

just to see if that would change anything, but its still slow. I'm assuming the slowdown is loading the QtGui4.dll or QtCore4.dll, does that occur in this step? I did recently update from Qt 4.6.2 and from MS Visual Studio 2005 and recompiled the dlls and I don't believe it was always this slow to launch.

*ADDED DETAILS:*

When stepping through in debug mode, the slowdown appears to be in qapplication_win.cpp in initializeMultitouch_sys() on line 4020:

iInkTablets->get_Count(&count);

*END ADDED DETAILS*

Any suggestions would be helpful because it seems that it should not be taking this long, or am I just being picky? Does 12 seconds to launch sound reasonable? Please let me know your thoughts.

Thank you

I may have found the solution to this problem:

http://bugreports.qt.nokia.com/browse/QTBUG-11309?page=com.atlassian.jira.plugin.system.issuet abpanels%3Aall-tabpanel

I will try it after lunch :)

SKolaMunn
17th October 2011, 17:01
I meant to say a long time ago, that was the solution. It was a bug that was fixed in Qt Version 4.7.0.