-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
For rasterizing SVG images we've used librsvg for some time. Another contender which we didn't choose originally is Batik. There are several respects in which librsvg is unsatisfactory and Batik might be preferable.
With Sun finally in the process of releasing their Java implementation under GPL, we don't have to worry about being so ideologically 'pure' about Java-based solutions these days... So I went ahead and did a quick rendering benchmark with some images plucked off of Commons:
http://www.mediawiki.org/wiki/SVG_benchmarks
rsvg is beating the pants off Batik by a factor of 6; on my laptop the average image in the sample took *two seconds* to render, compared to a third of a second for rsvg.
Java is traditionally slow for command-line-type tasks, with VM startup and JIT overhead inflating times significantly. It's possible that we could get much better performance by starting up a single VM and sending multiple requests to it.
If we can get performance out of Batik that approaches or exceeds librsvg, it may be desirable to consider switching.
On the other hand if it's still slow as a dog, we can forget it and concentrate on other things.
Would anyone like to fiddle with this, put together a test daemon? (Or at least a test program that uses the library to render a bunch of images from a list, so we can benchmark.) It's probably not that difficult, and would be a fun way for some of the Java-heads in the room to get involved. ;)
If nobody hops in, it has to wait until I get around to it, and well... ;)
- -- brion vibber (brion @ pobox.com)