[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: EXA performance problem
From:       Maarten Maathuis <madman2003 () gmail ! com>
Date:       2011-11-28 17:53:04
Message-ID: CAGZ4FES4bq7X=G8tf9WXAdr1=3ra1D+L5MsvutYzBded8xLbTw () mail ! gmail ! com
[Download RAW message or body]

On Mon, Nov 28, 2011 at 4:49 PM, Christoph Bartoschek
<bartoschek@or.uni-bonn.de> wrote:
> Am 28.11.2011 10:35, schrieb Christoph Bartoschek:
>
>> Now one has to look at
>> (*pGC->ops->PolyRectangle)(pDrawable, pGC, nRects, pRects);
>
> Here is what I see so far:
>
> - damagePolyRectangle is called for 2044 rectangles.
>
> - the damage region is computed it consists of about 1000 rectangles each
> time.
>
> - miPolyRectangle is called.
>
> - the function iterates over all rectangles and calls exaPolylines for ea=
ch
> of them because most have only a width and height of 0
>
> - exaPolylines calls ExaCheckPolylines.
>
>
> We see that for each rectanlge ExaCheckPolylines is called. I have added
> timers to this function to see what costs time:
>
>
> void
> ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int mode, int npt, DDXPointPtr ppt)
> {
> =A0EXA_PRE_FALLBACK_GC(pGC);
> =A0EXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pDrawable, exaDrawableLocation(pDrawable),
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pGC->lineWidth, mode, npt));
>
> =A0exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); =A0 =A0 =A0 // Step1: =
55 s
> =A0exaPrepareAccessGC (pGC); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 // Step2: 2.4 s
> =A0pGC->ops->Polylines (pDrawable, pGC, mode, npt, ppt); // Step3: 2.4 s
> =A0exaFinishAccessGC (pGC); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0// Step4: 2.2 s
> =A0exaFinishAccess (pDrawable, EXA_PREPARE_DEST); =A0 =A0 =A0 =A0// Step5=
: 2.2 s
> =A0EXA_POST_FALLBACK_GC(pGC);
> }
>
>
> We see that exaPrepareAccess needs most of the time. Is that expected?
>
> Inside we see that there are some region operations on the damage region =
in
> exaCopyDirty. As said before the damage region contains about 1000
> rectangles. So we have 2000 times several operations on 1000 rectangeles.
>
> I think this explains the runtime.
>
> Isn't it somehow possible to batch the rectangle drawing such that the
> region operations are not neccessary for each rectangle?
>
> Isn't is possible to expand the damage region such that it contains less
> rectangles?
>
> Is this still the correct list, or should I ask the EXA questions elsewhe=
re?
>
> Christoph
> _______________________________________________
> xorg@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@gmail.com
>

EXA doesn't have a seperate list, but now that you ask, you should
probably move to the xorg-devel mailinglist :-)

I don't have any answers right now, but i'll think about it.

-- =

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.
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: freedesktop-xorg@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic