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

Re: Testers needed for TV benchmark



I just want to point out something to look out for, since it is rather
counter-intuitive and a bit surprising.  I discovered this on a Linux
system while trouble-shooting a performance problem.

X servers often implement pixmaps by storing them in unused
(off-screen) frame buffer memory under the assumption that the
performance of these pixmaps is better than the ones in system memory.
 The idea is that blitting the pixmap to a window would be faster
since it is just a copy within a memory subsystem, rather than a
transfer from system memory to frame buffer memory.

Of course, once the unused frame buffer memory is exhausted,
additional pixmaps are stored in system memory.

The surprise is that, on some X servers, the off-screen pixmaps are
actually slower than the system memory pixmaps.  I can't explain this,
other than to suspect an implementation problem or oversight in the X
server code.

You can detect this by caching a series of, say, 50 images in pixmaps,
as described in other posts in this thread.  Then, measure the time it
takes to copy each one to a window.  Or, just watch the animation.  If
the first few seem slower, then this might be the problem.

One way to "fix" this is to create a set of dummy pixmaps not used in
the actual animation to "use up" the slow pixmaps.  Then, the rest of
the pixmaps will all be the "fast" ones.  Of course, this is all too
dependent on the X server, frame buffer memory size, desktop size, and
size of the pixmaps.

Even when the X server implementation is better, that is, the
off-screen pixmaps are faster, this can cause confusing benchmark
results since the copy times can vary in hard-to-describe ways.

Karl


"Pavel A. Romashkin" <pavel.romashkin@noaa.gov> wrote in message news:<3B71B610.DDB1A33A@noaa.gov>...
> "Pavel A. Romashkin" wrote:
> > 
> > I was trying this as JD sent this post. I must admit that there was no
> > speed increase, to my dismay.
> 
> Duh! It helps when you place the timer in the right place. I was timing
> everything, including preloading. Thank you, Liam. Of course, the
> correct output for preloaded pixmap windows is
> 
> TV-Device Copy Test: Array Size:      512        0.71153700 seconds
>   =>  Frames/sec:        70.270414   Frame time:     0.014230740
>    Video Xfer rate:        55262902. bytes/sec
> TV Direct Test: Array Size:      512         3.1362751 seconds
>  =>  Frames/sec:        15.942479   Frame time:     0.062725501
>    Video Xfer rate:        12537676. bytes/sec
> 
> Sorry.
> Pavel