[cairo] Text Grid Performance

Gerdus van Zyl gerdusvanzyl at gmail.com
Tue Feb 5 07:10:42 PST 2008


Hi,

Does anybody have any idea on how to speed up text rendering
performance? Below is a table of my current performance values, the #
is the number of individual text elements of string length 2 that is
being rendered. My goal is to have 250 text elements, since that is
what a typical Excel spreadsheet displays at one time. Currently is
runs at 8 FPS where to have smooth scrolling a minimum of say 15-24
FPS is required. The use case is a spreadsheet like table/grid.
Caching is not an option since the dataset is so large that scrolling
fills the view with all new values. Any thoughts are appreciated.

#	time	           per	               FPSper	         FPStotal
1	0.001232	0.001232	811.6882086	811.6882086
2	0.001789613	0.000894806	1117.5601	558.78005
50	0.022360104	0.000447202	2236.125514	44.72251028
100	0.044524933	0.000445249	2245.932651	22.45932651 <--last point of
acceptable perf
				
250	0.111312332	0.000445249		8.983730604

P.S. I am using Cairo 1.4.14 from gtk.org (that has a snazzy new
website!) through pycairo, and according to profiling all the time is
spent in cairo related code.
My text rendering for each element is basically: save,clip,render text
using pango,restore

Thanks,
Gerdus van Zyl


More information about the cairo mailing list