Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xpm slow?



 One thought I've had about pixmap creation is to change the way they
are initially read.

 Instead of calling the XpmCreatePixmapFromWherever function for all
2000 or so pixmaps, create a large montage of pixmaps (stored as something
like crossfire.pix1, crossfire.pix2, etc.)  These would be something like
a montage 20x20, or 25x20.  Exact size not really important, but it would
be nice to be able to display them on one screen with sxpm, and an montage
of all of them could really suck up a lot of memory in the load phase.
Keeping these montages smaller solves that problem.

 Then, when creating the pixmaps, the Xpm function only needs to be
called once.  XCopyArea could then be used to copy a section off the
montage pixmap into the small pixmap (likewise, there would also be a 
montage of the pixmap clipmask).

 How crossfire does graphics right now is hardly what I call really
optimized.  A lot of improvements could probably be made.

 --Mark