[cairo] Performance analysis of a Cairo application
cworth at cworth.org
Fri Oct 19 13:37:03 PDT 2007
On Fri, 19 Oct 2007 22:30:35 +0300, "Kalle Vahlman" wrote:
> operation)? So using image surfaces should be a decent way to ensure
> the worst case scenario is usable and any acceleration that happens is
> only a bonus...
It would be nice if that were the case... but
Sadly, when you have a situation where the acceleration only covers a
subset of the operations, then what often happens is that cairo, (or
the X driver, or whatever), has to spend a lot of time moving data
from video memory to system memory for the fallback and then back
All that shuffling back and forth can actually cost more than is saved
by any performance gains from acceleration. (And trying to predict the
cost+benefit analysis and guess the "right" place for pixmaps to live
has proven to not be a successful route in work so far.)
So I'm at that point where I think it doesn't make sense to use
acceleration unless it can effectively be used for _all_ operations.
Fortunately, with modern hardware and good specifications available,
(I'm thinking i965 here---hopefully AMD devices will be in a similar
state soon), we're seeing that we can in fact get to a point where we
can do reasonable rendering with no fallbacks at all.
For example, for glyph rendering (the biggest rendering bottleneck for
applications like mozilla), I was able to have no fallbacks at all on
the i965 here:
(The patch I describe there has since landed upstream.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071019/95e74f85/attachment.pgp
More information about the cairo