question about bad cairo performance on the olpc xo
sascha-ml-reply-to-2010-2 at silbe.org
Fri Sep 3 05:25:26 EDT 2010
Excerpts from Erik Blankinship's message of Fri Sep 03 07:49:27 +0200 2010:
> I need help understanding why I am getting very poor frame rates when I use
> pycairo to move a large image around the screen on an olpc XO. When I use
> pycairo to draw a rectangle of the same size on an XO, I get great
> performance! This is confusing to me because in my experience on other
> platforms, redrawing vector graphics is much, much slower than blitzing
> bitmaps to the screen.
Summary: Graphics acceleration is probably disabled on the OLPC build
you are likely to be using, causing vector graphics to be slow.
The relative performance of vector vs. bitmap graphics depends on quite
a few factors:
- bandwidth between main memory and video memory
- who renders the vector graphics: CPU ("unaccelerated") vs. graphics
- CPU performance vs. graphics chip performance
- complexity of the vector graphics operation
"Regular" PCs nowadays often use some portion of the main memory as
video memory ("shared memory") with a high-bandwidth link between CPU
and video memory. It isn't surprising if using pre-rendered bitmaps with
this kind of setup is faster than using vector operations.
I haven't checked the bandwidths on XO-1 (which is probably the one
you're talking about; results will differ on XO-1.5), but I do know
that until very recently the geode graphics driver had several bugs
if acceleration was enabled, so it's rather likely to be disabled in
the OLPC builds (though I don't know if it worked in older builds).
This means that the CPU has to do the work of executing your vector
operations *and* transfer the result (a bitmap image) to video memory.
This is obviously slower than skipping the vector operations step and
transferring a bitmap image right away.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: not available
More information about the Devel