PDA

View Full Version : Qt WebKit API is slow, true?



useryy
19th December 2011, 09:47
Using this code to load a webpage


iWebFrame->load(QUrl("http://www.ifanr.com/64307"));
qDebug()<<QTime::currentTime().toString();
connect(iWebFrame, SIGNAL(loadFinished(bool)), SLOT(process_LoadFinished(bool)));

It takes 5+ minutes to get response in the slot function.

Even if I set the url to a local html, it still takes 3 minutes.

Not sure it's my reason or not.

=================================================
Full code is here: ClickMe (https://skydrive.live.com/?cid=6466FE33F5454308&id=6466FE33F5454308%21213)

Loading "www.google.com" takes 21 seconds - This proves that the enviroment is correct.
Another page is from engadget.com, which takes 16 minutes. The page and its log is also attached.

Spitfire
19th December 2011, 10:37
It depends on the site and its servers.

Your example on my box returns:


MainWindow::entrance()
Get main frame
Connect
Begin loading
End loading. Time: "09:33:35"
baseUrl is: "about:blank"
MainWindow::process_LoadFinished(). Time: "09:33:36"
Ok
baseUrl is: "http://www.google.co.uk/"

and

MainWindow::entrance()
Get main frame
Connect
Begin loading
End loading. Time: "09:34:34"
baseUrl is: "about:blank"
QSslSocket: cannot call unresolved function SSLv3_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_error_string
QFont::setPixelSize: Pixel size <= 0 (0)
QSslSocket: cannot call unresolved function SSLv3_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_error_string
MainWindow::process_LoadFinished(). Time: "09:34:46"
Ok
baseUrl is: "http://www.ifanr.com/64307"

google takes blow a second to load, the ifanr link takes a bit longer but still not as long as in your case.