PDA

View Full Version : QtWebEngine is extremely slow



GimpMaster
17th June 2015, 07:35
I've just recently started playing around with the QtWebEngine that runs on Chromium. I created a very simple QML project to just load a webpage. What I'm noticing is that the QtWebEngine (using WebEngineView) is extremely slow at loading sites. A coule google searches shows I'm not alone.

I'm using Window 7 with VS 2013, Qt 5.4.0 and also tried Qt 5.5.0 beta with the same results. For those interested here is my source code.


main.qml


import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtWebEngine 1.0

ApplicationWindow {
width: 1280
height: 720
visible: true
ColumnLayout {
anchors.fill: parent
TextField {
id: addressBar
focus: true
Layout.fillWidth: true
text: webView.url
onAccepted: webView.url = text
}

WebEngineView {
id: webview
url: "www.google.com"
Layout.fillWidth: true
Layout.fillHeight: true
}
}
}



main.cpp


#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtWebEngine/qtwebengineglobal.h>

int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtWebEngine::initialize();
QQmlApplicationEngine appEngine;
appEngine.load(QUrl("main.qml"));

return app.exec();
}


Does anybody else use this QML item. Do you see this same issue?

GimpMaster
18th June 2015, 04:33
Hmm, no responses. Am I the only one having this problem? Are other people using the QWebEngine. The sample projects are just as slow.

jefftee
18th June 2015, 05:18
I have not used QWebEngine personally, but I just compiled/ran the quicknanobrowser example from Qt 5.4.1 and it doesn't seem slow to me. Can you define "extremely slow"?

GimpMaster
18th June 2015, 07:15
Thank you for responding. If for example I use Chrome or Firefox and load google.com it loads in probably 1-2 seconds. With the Nanobrowser example Google.com MIGHT load in 10-15 seconds. You can actually watch the jpeg images get downloaded scanline by scanline.

jefftee
18th June 2015, 08:31
Sorry, I see subsecond to 1 second response times loading google.com. Any DNS issues on your end perhaps? I don't know why else your load times would be so much worse.

GimpMaster
18th June 2015, 17:39
Interesting. I sent the application to a friend to try (after determining the massive number of files for deployment, manually) and he didn't see the same issues. Perhaps its something odd with my PC. Thanks for the help.

alketi
18th June 2015, 21:53
This bug may be of some help: https://bugreports.qt.io/browse/QTBUG-44763

It points to a problem with LAN adapters.

GimpMaster
19th June 2015, 06:26
Thank you so much! That was exactly the problem. I had a VPN adapter enabled and a Virtbox. Both not connected. When I disabled both adapters and kept my primary enabled it worked just great.