Re: Animations

Trent Piepho (xyzzy@u.washington.edu)
Tue, 18 Mar 1997 10:46:03 -0800 (PST)

To subscribers of the xforms list from Trent Piepho <xyzzy@u.washington.edu> :

On Tue, 18 Mar 1997, Steve Lamont wrote:
> To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
> > In a program that I'm writing, I need to show an animation with
> > 600X600 pixmaps. The problem is that this is terribly slow and I
> > suspect that it has to do with the picture being sent back and forth
> > between the server and the client. I don't know what it would be
> > that takes about two seconds in the process else...
>
> If you're converting the image to a Pixmap with XPutImage() every time
> you display it, you're taking a pretty large hit as the client copies
> the image to the server.

Copies it several times in fact. All the data is passed through a unix or
inet socket. One copy from your user space to kernel space, one copy from
kernel space into xserver user space, one copy from xserver space into
the frame buffer.

[store all the images into server pixmaps ahead of time]
The only problem is that 5 seconds of 10 fps animations at 600x600 8bit needs
18 megabytes of xserver memory. That's a lot.

If you're on the local machine, you can use the MIT-SHM extension. This way
the slow path through a socket to the xserver is avoided. This doesn't work
over a network however.

|Gazing up to the breeze of the heavens \ on a quest, meaning, reason |
|came to be, how it begun \ all alone in the family of the sun |
|curiosity teasing everyone \ on our home, third stone from the sun. |
|Trent Piepho (xyzzy@u.washington.edu) -- Metallica |
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/