[cairo] WinXp benchmarks

Oleg Smolsky oleg.smolsky at pacific-simulators.co.nz
Wed Mar 2 19:44:58 PST 2005

Hi all,

I've just done a few benchmarks drawing a gauge (a dial with a needle
and a few digits) into a cairo surface attached to DCs of various
sizes. Here are the results:

200x200 DC:     6ms  per frame
300x300 DC:     9ms  per frame
400x400 DC:     15ms per frame
500x500 DC:     24ms per frame
600x600 DC:     31ms per frame
700x700 DC:     41ms per frame
800x800 DC:     52ms per frame
900x900 DC:     65ms per frame

It's easy to see that when the square edge grows linearly, both the
pixel count and rendering time grow exponentially.

BTW this test is done by attaching cairo to DCs of varying size and
drawing lots of frames as quickly as possible. Ie my cairo_*() calls
do not change, but the viewable output keeps getting bigger. In other
words, cairo keeps rendering more and more pixels.

So, how fast is cairo on other platforms? Is there a way to reduce the
rendering time? (I need to draw a screen full of stuff, and the time
approaches 100ms)

Also, it seems that the time to draw a big picture is similar to
drawing three 1/3 size ones. Ie the bottleneck isn't cairo's math, but
rather rasterizeEdges() function which invokes
AddAlpha(N_X_FRAC(N_BITS)) millions of times.....

Best regards,

More information about the cairo mailing list