On Friday 19 October 2001 17:54, Scott Moore wrote: > I'm using Batik to generate charts and graphs as either SVG or PNG images. > Currently, I do this by creating a SVG DOM and adding the elements and > attributes to the DOM that describes my graph. Afterwards, I either > serialize the DOM to produce native SVG or I use the Batik PNG transcoder > to produce a raster image. > > All this works great and I really love the power of the library. My only > real problem is that it's slow. Like on the order of 1 second per image, > which are pretty simple images (see attached for sample). > > Is this speed normal? Are there ways to enhance the speed? Is using the > SVG DOM the reason it's so slow? Should I write the SVG as a string and > then load it to avoid the manual creation of the SVG DOM? I'm grasping at > straws to try to increase performance (like 10 times faster). > > This is running on Windows 2000, 800 mhz machine with 256 megs RAM. JDK > 1.3.1_01
Have you tried to feed the transcoder with the SVG DOM tree? ex: new TranscoderInput(svgDocument) The TranscoderInput class can take a DOM tree, not just a URI or an InputStream in parameter. Hope that helps. Thierry. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
