Re: Full screen GtkDrawingArea performance sucking - help me!



The problem is that the expose handler gets called again before the XRender operations from the previous exposes have finished. Hence, XRender operations just queue up behind each other at a certain level of utilisation. It's the queueing that manifests itself as "lag". As a workaround, you can block the expose handler until the drawing is actually done, but that's not very nice if you have other things to service in the same thread like audio etc.

I think a proper solution would be to have GTK/GDK queue up the drawing requests while X hasn't finished working on the drawable.

Does anyone have any better suggestions? If not, how can we do this?

On Mon, 2007-08-27 at 15:29 -0400, Behdad Esfahbod wrote:
On Mon, 2007-08-27 at 03:49 +0100, Alex Jones wrote:
> Hi list
> 
> In my quest to write an awesome backdrop rendering app, I have this test
> program that draws random colours to a GtkDrawingArea. For me, any size
> over about 300x300 at 60fps just causes insane lag in Xorg -- the
> renderings seem to queue up. If I run cairo clock maximised full screen,
> it literally LAGS by about 5 seconds. Telling it to close takes ages, as
> if the X connection is completely saturated. My own cairo clock which
> draws the second hand smoothly between intervals shows that it seems to
> run at less-than-real-time, but still smoothly. Eventually, the clock
> skips ahead by 10 seconds or so.

FWIW I experienced the same slowness in full-screen mode at our (Carl
and I) GUADEC talk.  Profiling showed most of the time spent in xorg, as
expected.  I imagine massive pixmap migration happening... Carl may know
more.


behdad

> I have a 2.8 GHz Pentium 4 with 1 GB of RAM, nothing using my CPU and a
> Radeon 9800 Pro with the r200 drivers. What's going on? This is a total
> spanner-in-the-works for me.
> 
> Cheers
> 
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]