Bug 2694 - cairo_text_extents fails to do caching
Summary: cairo_text_extents fails to do caching
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-10 12:52 UTC by Ian McIntosh
Modified: 2005-09-06 00:30 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Source code illustrating one case of FPE in cairo. (1.04 KB, text/plain)
2005-08-18 19:40 UTC, ellson
Details

Description Ian McIntosh 2005-03-10 12:52:30 UTC
cairo_text_extents() takes about seven times as long as cairo_show_text().

sysprof shows that cairo_text_extents spends its time in _cairo_font_create and
then _cairo_ft_font_create then in libfontconfig.

Owen Taylor suggested that there is caching that should be happening here and
asked me to file this bug!
Comment 1 ellson 2005-08-03 23:54:12 UTC
Created attachment 3231 [details] [review]
xrandr-deadlock-fix.patch
Comment 2 ellson 2005-08-03 23:54:41 UTC
Created attachment 3232 [details] [review]
Proposed patch
Comment 3 ellson 2005-08-03 23:59:55 UTC
Oops!   Please ignore previous two attachments.  They belong to bug #2675 .  Sorry.
Comment 4 ellson 2005-08-18 19:40:15 UTC
Created attachment 2922 [details]
Source code illustrating one case of FPE in cairo.
Comment 5 Carl Worth 2005-08-22 17:14:25 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Comment 6 Carl Worth 2005-09-06 17:30:23 UTC
During 1.1.1 Keith committed a fix that adds a cache of user-space metrics:

2005-08-31  Keith Packard  <keithp@keithp.com>

        Reviewed by: otaylor, cworth
        * src/cairo-ft-font.c: (_get_bitmap_surface),
        (_render_glyph_outline), (_render_glyph_bitmap),
        (_transform_glyph_bitmap), (_get_pattern_ft_options),
        (_cairo_ft_scaled_font_create), (_cairo_ft_scaled_font_create_toy),
        (_decompose_glyph_outline), (_cairo_ft_scaled_glyph_init),
        (_cairo_ft_ucs4_to_index), (_cairo_ft_show_glyphs),
        (_cairo_ft_font_face_scaled_font_create),
        (_cairo_ft_font_face_create),
        (cairo_ft_font_face_create_for_pattern),
        (cairo_ft_font_face_create_for_ft_face):
        Store glyphs in new per-scaled font caches which
        hold user-space metrics and device space bounding boxes

Ian mentioned to me that this fix helped his application a great deal,
so I'm closing this as fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.