Re: interesting article on XFree86 speed
Owen Taylor <[email protected]> Thu, 24 Oct 2002 22:20:18 -0400 (EDT)
| Newsgroups | gmane.comp.xfree86.render |
|---|---|
| Message-ID | <[email protected]> |
Allen Akin <[email protected]> writes: > On Thu, Oct 24, 2002 at 05:28:58PM -0400, Owen Taylor wrote: > | > | I've long been in the "just redraw it camp". The reason that > | I'm deviating from that position now isn't so much that I don't > | think it is possible to redraw fast enough ... fill rates have > | gone up even more than memory sizes and bandwidth ... it's that > | to get a truly _smooth_ appearance you never want to draw a > | pixel one way and then fix it up later. And an asynchronous > | expose model is incompatible with that. > > Are asynchronous exposures truly the problem, or just unacceptably high > latencies (time from mouse movement to redraw) combined with the lack of > double buffering? There are two latencies: 1) Time from mouse motion to when drawing starts 2) Time from drawing starting to drawing finishing I'm mostly considering the second; double buffering can't eliminate it if drawing is being done by multiple entities; examples: - The window manager moves a window, the server blits the window to the new position and clears the area underneath, the client underneath repaints. - The window manager resizes the window, the window manager repaints the frame for the new size, the client repaints the content area for the new size. Clearly if the latency is small enough it doesn't matter; but that "small enough" is pretty small. I'd estimate it at 30-40ms for the first example above, and 10-20ms for the second. (No science claimed for those numbers; based on personal experience and back-of-the envelope guesses of number-of-pixels at a particular motion speed.) Also, unless you are syncing to the vertical blanking interrupt, you have unpredictable interjection of latencies at 1/refresh frequency. Application writers don't generally write their apps to be able to repaint in 10-20ms... there isn't a perceived need to get that amount of speed. And when you have a big pile of apps all exposing at once, things get worse. Regards, Owen