[cairo] Text layout speed in roadster -> font cache needed in cairo

Owen Taylor otaylor at redhat.com
Tue Mar 15 06:38:45 PST 2005


On Mon, 2005-03-14 at 20:41 -0800, Keith Packard wrote:
> I looked into why text drawing was so amazingly slow in roadster and 
> discovered that it was setting the font each time it measured a string.
> This caused cairo to call down to fontconfig to match the font, open the 
> font file, load the font and measure the string.  As 'cairo_restore' was 
> called immediately after drawing the string, the carefully constructed 
> font was discarded only to be immediately regenerated for the next string.
> 
> Moving the font selection all the way outside the label computation so 
> that it was done once per layer instead of once per label provided a huge 
> speed up.
> 
> It would be nice if cairo would do a bit of font caching to avoid all of 
> this.

Ian tracked down the lack of caching a few days ago; it's in bugzilla
as:

 https://bugs.freedesktop.org/show_bug.cgi?id=2694

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050315/d214f50b/attachment.pgp


More information about the cairo mailing list