[cairo] Cairo with Pango Tips

Gerdus van Zyl gerdusvanzyl at gmail.com
Tue Sep 11 05:23:32 PDT 2007


Hi

Does anyone have any tips on where the bottlenecks lay with rendering
Pango thru Cairo?
The cr.show_layout(layout) function seems to be the most expensive.

My use case is a table/datagrid that displayes text in each cell.
Every cell is cached to a  surface after first render. The problem is
when the grid is scrolled and every cell needs to be rendered the
framerate drops to 10fps (50% cached: >50fps), so scrolling throught
5000 records are very stuttery. Rendering once at start to a large
offscreen surface and using offsets to render is faster but is very
slow once the surface gets above 1000 pixels which is understandable
(and memory usage unrealistic).

Thus if anyone has suggestions on how to speed text rendering or some
better method to contruct a datagrid, please help :-)

Thank you,
Gerdus van Zyl
www.infireal.com


More information about the cairo mailing list