GTK/Pango performance benchmarks

Hi all,

I have made some simple tests in order to find out whether the
discussed pango performance problems are relevant. I have created a
simple caching scheme hack in gtkcellrenderertext. New pango layouts
are cached and reused in the function get_layout(.) in
gtkcellrenderertext.c. The performance increase is quite significant -
87% performance increase when constantly repainting the "Model window"
in the testtreefocus test.
The test was conducted on a 1.3Ghz Duron with a NVIDIA GeForce 4 MX
graphics board using nvidia supplied drivers with render acceleration

GTK performance have been discussed endlessly. Pango seems, however,
to be a bottleneck. Inquiries have also been made about an objective
benchmark program. I would like to suggest a simple scheme, for
graphics perfformance, where frames per second from a "typical"
application is benchmarked and used as metric. Why? For the simple
reason that every frame refresh rate is perceived as fast for

The absolute pango performance was also benchmarked. The "Model
window" maximized is comprised of 47*8=376 items on a 1280x1024
display with a font size of 8pt.
Pango is capable of lay-outing [1] approximately 17500 "foo bar foo"
items per second.
Given a refresh rate of 60Hz pango is capable of lay-outing 293
items/frame. Hence,
given that X could render the text in zero time would it not be
possible to paint
such a configuration every frame. 

The every frame requirement could be regarded as crazy but I would
guess that the next
generation of Windows and MacOSX is aiming for such performance.

Best regards

[1] Pango layout benchmark
for (.) {
    pango_layout_set_text(layout, "foo bar foo", -1);
    iter= pango_layout_get_iter(layout);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]