Version 2 (modified by, 15 years ago) (diff)


Profiling of QtWebKit

Basic Principles

Performance has many different aspects. This can include the binary size, memory usage, CPU usage, execution speed and in most cases when optimizing for one property another one will be impacted. E.g. for optimizing for execution speed another data structure with a bigger storage space is used. It is important to not only look at one property when doing a change and this is why we are focusing on the following items:

Execution speed
  • How long does it take to load a page, how long does it take to scroll, how long does it take to paint, how big is the latency is to start a network job, how long does it take to decode a image?
  • In Qt the time can be measured using the QBENCHMAKR { CODE } macro in QtTest test cases.
CPU usage
  • Who is using the CPU, how often is it used?
  • There are many different tools on many different architectures. On Linux x86 there is callgrind for other architectures supported by Linux there is OProfile. The biggest difference between OProfile and callgrind is that OProfile is working by collecting samples and that callgrind is executing on a virtual machine.
Memory usage
  • How much memory is consumed? How does this change over time?
  • There are multiple levels to track this. One way is to monitor how many pages the kernel has allocated for the process, another one is to look at the requested address space (sbrk) and the third way is to look at calls to malloc/free. The memprof and memusage utilities do keep track of malloc/free calls.