wiki:QtWebKitPerformanceWork

Version 7 (modified by dbates@webkit.org, 14 years ago) (diff)

Added section Prerequisites to mention

QtWebKit Performance Tuning Overview

Prerequisites

You must have Python installed to run the included scripts. You can download it at http://www.python.org/download/.

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 this 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 to be used database to the process, 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.