On Tue, 2010-12-07 at 16:54 -0800, James Jones wrote: > > [ In terms of GNOME 3 and NVIDIA: If it's *that* slow to update clip lists > > for a GLX window, then just save the last one you got, and during > > ValidateTree memcmp() and if nothing changed, don't do anything. Can't be > > more than 20 lines of code. Would make thousands of GNOME 3 users happy ] > > Can you point to a more specific use case (start app A, drag it over app B, > etc) We've got a huge backlog of work to do in this area, but specific worst- > case examples are always good.
OK, I should explain that off-hand remark some more - it's been discussed at various times on IRC but probably never written down. The situation where we trigger problems with GNOME Shell is when you have a GL window with manually redirected child windows. (We use this in a couple of places to embed legacy X rendered windows within a GL-drawn canvas.) When you manually redirect windows with the Composite extension, they no longer clip the parent window. So moving them around actually does absolutely nothing to the parent clip. However, ValidateTree still ends up getting called because things have to be updated inside the redirected window. The observed behavior is that whenever we move such a window, we take a huge performance hit with the NVIDIA driver. If we aren't moving windows around we do 60fps no problem, if we move a window once per frame we drop to a few frames per second. It's so slow that my assumption is that we're triggering some sort of timeout or bug in the driver, but it might just be normal overhead from changing clip-lists and synchronizing clients. My understanding is that because pScreen->ValidateTree is where the driver hooks in it's very hard to optimize this out at the xserver level - to disguise the fact that anything happened from the driver. But for a driver where changing clip lists is potentially expensive for whatever reason, it seems to me that saving the last clip list and detecting that the clip list didn't change is a simple and very worthwhile optimization. (And this isn't the only case where ValidateTree can be called without the clip list for a window changing.) - Owen _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel