EXA performance problem

Maarten Maathuis madman2003 at gmail.com
Sun Nov 27 22:43:13 PST 2011


On Mon, Nov 28, 2011 at 2:41 AM, Christoph Bartoschek
<bartoschek at or.uni-bonn.de> wrote:
> I have new information. I am no longer sure whether it is a problem with
> EXA.
>
> I have a testcase that currently takes 90 seconds to draw all rectangles. I
> see that in damage.c two functions are mainly used:
>
> damagePolyRectangle
> damagePolyFillRectangle
>
> The first function calls for each given rectangle up to four times
> damageDamageBox (pDrawable, &box, pGC->subWindowMode);
> which adds the box to a region. The function then calls damageRegionAppend.
>
> This part takes in sum 30 seconds of my testcase. I think the code has
> quadratic behaviour here becuase it adds rectangle by rectangle instead of
> first adding them to a region and then calling damageRegionAppend. I think
> removing the quadratic behaviour can reduce the runtime significantly.
>
> About 60 seconds are spent in the calls
>
> (*pGC->ops->PolyRectangle)(pDrawable, pGC, nRects, pRects);
> (*pGC->ops->PolyFillRect)(pDrawable, pGC, nRects, pRects);
>
> However I do not yet know why they are so slow.
>
> Is damage.c part of EXA?
>
> Christoph
> _______________________________________________
> xorg at lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg
> Your subscription address: madman2003 at gmail.com
>

No, damage is an extention, it is called by EXA, it's probably adding
all you rectangles to a damage region used to determine how much data
is actually valid (needed for ram<-->vram migrations for example).

One thing that just comes to mind, if you are rendering a million
rectangles, how many of those do you actually see on your screen?

Anyway, you can try optimizing damaga, exa and either fb or mi (for
PolyRectangle PolyFillRect software ops). I don't know how efficient
the region code is at reducing the number of rectangles if they
overlap, a region is built up out of rectangles as well.

-- 
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.



More information about the xorg mailing list