MacX and xgif: Why Color Table Change Causes Slow Display



Article Change History
----------------------
04/20/93 - REVIEWED
* For technical accuracy.



Why is MacX so slow when a client changes the color table? The change of a
single table entry seems to cause a substantial delay in the displayed pixel
and is accompanied by some strange color changes in the current table (for
example, color flashes).

What is the problem? Is there a way around this so that the display update is
as clean and fast as the stand-alone X11 server?

The problem that you are experiencing is most likely due to the way the X
client application uses the Color Lookup Map. We have seen a difference
between the two versions of the xgif program. The old version of xgif
(which uses the default colormap) causes the most slowness. The new version
(which uses the colormap routine in the Xlib) behaves much faster. Here are
examples of C code used by the two versions of xgif:

Old version:
#define DefaultColormap(pty, scr) (((dpy)->screens[(scr)]).cmap)
theCmap = DefaultColormap(theDisp, theScreen);

New version:
theCmap = XCreateColormap(theDisp, rootW, theVisual, AllocNone);

We also experienced similar effects (color flashing and/or changing) on the
Native X11 server.


Published Date: Feb 18, 2012