wiki:QtWebKitPerformanceWork
Last modified 3 years ago Last modified on 10/28/10 12:48:15

QtWebKit Performance Tuning Overview

Prerequisites

Getting the sourcecode, building and installing

The code can be checked out from the QtWebKit git repository, it requires Qt4.5.x or a Qt4.6 snapshot post Qt4.6 TP1.

$ git clone git://gitorious.org/qtwebkit/performance.git
$ cd performance
$ qmake
$ make

# This will install to the Qt Directory
$ make install

# This will install to $PWD/tmp and then the Qt Directory
$ make install INSTALL_ROOT=$PWD/tmp 

Performance Utilities Overview

The performance utilities contain utilities for the host, manual testing applications and benchmarking applications. All this is explained in depth on the Performance Utilities wiki site.

Running the tests

To run the tests one machine acting as a server and one machine acting as a client is needed, additionally mirrored web content must be available. This content can be provided on request, or it can be mirrored using the mirror application. For an overview of the utilities, how they work and what they should do please see the above section.

Preparing the server

On the server the http_server must be launched. root access is required to be able to bind to port 80 of the system. If a web server like apache is already running it must be stopped before starting the http_server. The server will abort when it fails to bind to the port. When starting the http_server pass the path to the database file to be used as the first command-line argument, e.g. sudo ./http_server benchmark_content.db.

Preparing the client

On the client the /etc/hosts file must be edited. For the mirrored content it must point to the IP address of the server. In the mirror/ is a script called create_hosts.py which helps to create the host entries for a given database and IP address. The script is requiring python so it might be necessary to execute the script on the desktop and append the output to the /etc/hosts of the target.

The tests can be executed by executing tst_loading, tst_scrolling and tst_painting. During the test execution numbers are printed on the display. All the benchmarks are using the QtTest framework which allows to pass options like --iterations NUMBER to force repeating the loading more than once.

Running the tests with profiling on target hardware

One of the reasons to create the test suite is to profile QtWebKit to identify possible improvements. Various approaches were compared and a in depth discussion on how to profile can be found on the Profiling Setup page.

Performance backlog

The Performance utilitiy has identified a set of work areas in the performance utilities themselves, QtWebKit and Qt. The backlog will contain a summary, and some description of how to carry out the change. See the Qt/QtWebKit backlog and Performance backlog for more information on work items.

Common Windows Errors

Microsoft Visual C++ Runtime Error when you run http_server

If you see an error dialog with a message of the form:

Runtime Error!
Program: ...performance\host-tools\http_server\debug\http_server.exe

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

then http_server could not bind to port 80 because another application/service is already using it. Hence, you must quit the application/service that is using port 80 before running http_server.