There's a lovely little program 'dvipng' which was designed to do real-time previews of LaTeX in an editor (http://sf.net/projects/preview-latex/) but is available as a stand-alone utility as well. This can replace the dvips & convert steps of our math rendering. In theory it should be faster (I haven't benchmarked it), but the neat thing is that it can produce output with a transparent background, which has been asked for for a while.
I've been able to get pretty nice output with this command line: dvipng -q -D 120 -bg Transparent -T tight -o outputfile.png inputfile.dvi
which produces files about the same dimensions as our current stuff. They are 8-bit indexed PNG images with solid transparency, which is compatible with Internet Explorer for Windows without any hacks, and will still look nice on most light-colored backgrounds. However, they won't look too great on a dark background, and some browsers may not be able to print them correctly. There's also a truecolor option that I haven't tried (which has potential problems of its own).
Attached is a diff to render.ml which uses dvipng instead of dvips+convert. It would probably be fairly straightforward to make it a conditional option, but I don't know ocaml. ;)
dvipng requires libgd to be available.
-- brion vibber (brion @ pobox.com)