Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.5.1, 5.6.0 Beta, 5.7
-
None
-
OS X Yosemite - Clang
OS X El Capitan - Clang (on another Mac)
Android 5 (phone)
Description
Here is a simple test:
import QtQuick 2.4
Timer
{ running: true repeat: true interval: 1 onTriggered: Qt.vector3d(0, 0, 0); }And here the profiling result after 30 seconds of QML profiling (the profiler has been launched 10 seconds after the app started to avoid initialisation phase) :
Location Type Time in Percent Total Time Calls Mean Time Median Time Longest Time Shortest Time Details
<program> 100.00 % 344.098 ms 1 344.098 ms 344.098 ms 344.098 ms 344.098 ms Main Program
main.qml:8 Signal 100.00 % 344.098 ms 18928 18.179 µs 14.082 µs 2.287 ms 3.218 µs onTriggered: Qt.vector3d(0, 0, 0);
main.qml:8 JavaScript 80.28 % 276.240 ms 18928 14.594 µs 11.139 µs 2.281 ms 2.628 µs onTriggered
Take a look at the Javascript execution time for just an instantiation of a Qt.vector3d (same thing happens for ordinary calls to C++ function, custom or not):
Mean 14.594µs - Median 11.139µs - Longest 2.281ms - Shortest 2.628µs
If the Mean time seems fair, the longest is wayyy to long for something so basic. And this profiling has been made on a high end cpu. But on my android phone it results in very annoying intermittent visual lags.
Related topic on the Qt forum : https://forum.qt.io/topic/62606/inconsistent-computation-times-during-q_invokable-function-calls/3