Analyzing Performance of QtQuick Applications

tmcguire's picture

Thomas McGuire
KDAB
Europe Date: 
Wednesday, October 8, 2014 -
1:30pm to 2:30pm
Europe Room: 
A3+A4
Europe Track: 
North America Date: 
Wednesday, November 5, 2014 -
4:00pm to 5:00pm
North America Room: 
IJ
North America Track: 

Presenter Bio: 

Thomas is a professional Qt developer for several years and works at KDAB as a software engineer, consultant and trainer. As a software engineer, he works on different customer projects, both widget-based and, increasingly, QtQuick-based, with a focus on embedded. Thomas contributes to the Qt project and has approver status there. He started working with Qt in the free software KDE project, where he maintained the mail application KMail for a long time. Thomas has a master degree in computer science and studied at the University of Siegen and the University of Edinburgh. Despite his last name, he is German and currently lives in Berlin.

Abstract: 

A fluid and performant user interface in QtQuick applications is an important factor, especially considering that users increasingly demand an "iPhone-like" experience, while at same time, applications often run on a resource-constrained embedded system.
What can be done when a QtQuick application does not satisfy the performance requirements? QML is a high-level language, so using tools normally well suited for profiling C++ applications, such as CPU profilers like V-Tune, oprofile and perf, will not yield usable results. The output of those tools is at the level of C++ functions and classes, which for QtQuick applications ends up being internal code of the QML engine, too low-level to give a meaningful picture for an application developer. Fortunately, both the QML engine and the QtQuick scenegraph provide high-level tools to introspect and analyze matters related to performance.
In this talk, the speaker will present those tools, together with other methods to further analyze the execution speed.
The primary tool for this will be the QML profiler, which can visualize QML binding evaluation time, component compilation and creation time and even painting performance. The QML profiler is the starting point for every investigation for QtQuick applications, and is especially suited for looking at startup speed and reaction time of input events. The speaker will show how to understand its output, especially how it relates to the different phases of loading a QML file.
For rendering performance, the speaker will look at various environment variables that break down frame timing and visualize various aspects of the QtQuick scene such as overdraw and batching. In addition to that, he will have a closer look at the low-level OpenGL calls with apitrace.
During the talk, the speaker will relate experience from real world projects, describing the issues encountered there and how they were solved. Besides showing the tools and explaining how to interpret their output, he will also show some typical problem resolutions.