[cairo] Text performance on windows?

Damian Frank damian.frank at gmail.com
Wed Aug 27 11:16:51 PDT 2008

On Tue, Aug 26, 2008 at 2:28 PM, Owen Taylor <otaylor at redhat.com> wrote:

> > I find it quite interesting that dib is faster than ddb.  In
> > particular, the ExtTextOutW call is tremendously slower, and yet the
> > DDB case seems to incur much more overhead in
> > cairo_gstate_show_text_glyps for the DDB case.  Is this to be
> > expected?
> Check in a debugger that you have a direct code path:
>  cairo_show_text() =>
>    _cairo_gstate_show_text_glyphs() =>
>    _cairo_win32_surface_show_glyphs() =>
>    ExtTextOutW()
> If you hit a fallback path instead, why it's hitting the fallback path
> (whether
> it's a cairo bug or something you are doing) is why it is slow.

Unfortunately, I can't actually directly debug this (or at least I haven't
figured out how to convince a debugger to load the symbols) due to how we're
dynamically loading the DLL and calling into function pointers.

However, I am 100% sure that the call goes through the above chain,
culminating in ExtTextOutW.  I can't promise there aren't other function
calls in between those callers, since I can't look at a stack, but I suspect
that's enough.

Anyway, I guess right now the big thing is, there's an awful lot of overhead
incurred on the way to ExtTextOutW; the actual ExtTextOutW call takes a
minority of the time, even in the DIB case.  Is this surprising, or is this
seen as an inevitable result from having a rich API?

Thanks for your help,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080827/ed38c229/attachment.html 

More information about the cairo mailing list