Make the underlying transport mechanism of the webchannel pluggable.
This enables us to optionally use navigator.qt instead of a WebSocket,
which is nicer setup-wise and is also slightly faster:
navigator.qt:
284.0 msecs per iteration (total: 2,840, iterations: 10)
WebSocket:
295.8 msecs per iteration (total: 2,959, iterations: 10)
The baseline is ca. 203 msecs, which would mean a performance boost
of ca. 12.7%.
Furthermore, this sets the fundation to eventually add a WebEngine
transport mechanism. The WebViewTransport should also be removed and
instead the WebView itself should directly implement the
WebChannelTransportInterface.
Change-Id: I368bb27e38ffa2f17ffeb7f5ae695690f6f5ad21
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| commit | 54f66cc7a1e17155e90a1d3b5c33f627dbd0d50f |
| parent | 05bafd509ca302fc63465fece7cd0c33ec602e31 |
| author | Milian Wolff <milian.wolff@kdab.com> |
| committer | The Qt Project <gerrit-noreply@qt-project.org> |
| commit time | Thu, 6 Feb 2014 16:32:20 +0100 |
- M examples/qml/example.qml
- M examples/qml/index.html
- M examples/standalone/main.cpp
- M src/imports/webchannel/plugin.cpp
- M src/imports/webchannel/qmlwebchannel.cpp
- M src/imports/webchannel/qmlwebchannel.h
- A src/imports/webchannel/qmlwebviewtransport.cpp
- A src/imports/webchannel/qmlwebviewtransport.h
- M src/imports/webchannel/webchannel.pro
- M src/webchannel/qmetaobjectpublisher.cpp
- M src/webchannel/qmetaobjectpublisher_p.h
- M src/webchannel/qwebchannel.cpp
- M src/webchannel/qwebchannel.h
- M src/webchannel/qwebchannel.js
- M src/webchannel/qwebchannel_p.h
- M src/webchannel/qwebchannelsocket.cpp
- M src/webchannel/qwebchannelsocket_p.h
- A src/webchannel/qwebchanneltransportinterface.h
- M src/webchannel/qwebsocketserver.cpp
- A src/webchannel/qwebsockettransport.cpp
- A src/webchannel/qwebsockettransport.h
- M src/webchannel/webchannel.pro
- M tests/qml/WebChannelTest.qml
- M tests/qml/data/bench_init.html
- M tests/qml/data/disconnect.html
- M tests/qml/data/grouping.html
- M tests/qml/data/method.html
- M tests/qml/data/property.html
- M tests/qml/data/receiveRaw.html
- M tests/qml/data/respond.html
- M tests/qml/data/send.html
- M tests/qml/data/signal.html
- A tests/qml/data/testsetup.js
- M tests/qml/data/wrapper.html
- M tests/qml/tst_bench.qml
- M tests/qml/tst_webchannel.qml
- M tests/webchannel/tst_webchannel.cpp
- M tests/webchannel/tst_webchannel.h