Newsgroups: comp.windows.x Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: doug@genmri.UUCP (Doug Becker) Subject: Re: XPutImage Message-ID: <9103211808.AA24098@genmri.sane.COM> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet References: <118960@philabs.Philips.Com> Date: 21 Mar 91 18:08:25 GMT Lines: 31 Is there a faster way to display sequences than using XPutImage() in a loop? That depends on your environment, your application, and on the tradeoffs you're willing to make. Here are two alternatives: 1. Use pixmaps and XCopyArea. (That is, create your image, XPutImage it into a pixmap, and XCopyArea the pixmap into your window.) In my environment, this method can be 5-7 times faster than XPutImage. The disadvantage of this approach is that it is costly in terms of server resources (mainly memory). This can be a significant drawback, especially if your image is deep, your pixmaps are large, or server memory is limited. 2. Use MIT-SHM (the shared memory extension -- XShmPutImage). In my environment (and depending on the size of the image), this is only marginally slower than pixmaps, and consumes fewer resources (a shared memory segment and ID). The major disadvantages to this method are that it only works locally (i.e., when the server and the client are running on the same machine), and that MIT-SHM is a nonstandard, experimental extension, which means that you cannot rely on every server supporting it. A third alternative is XIE (the X Image Extension). I've no experience with that, so I'll leave it to an XIE expert to comment. -- Doug Becker doug@nmri.ge.com crdgw1!sane!doug