Implementing one of the todo items from the redisplay-x.c code, the
following patch keeps an XftDraw structure in the X frame object, and
uses that for all drawing related to that frame.
The Xft library uses this structure for, among other things, keeping a
cache of rendered characters in the server. Retaining the object means
that they stick around, rather than being recreated every time text
needs to be drawn.
This should improve performance everywhere, but most significantly on
remote X sessions by avoiding a huge number of X requests to create and
destroy the pixmaps associated with the frame.
Daniel