Now there's some interesting information in there. You say you're using the print API. Does that mean you actually don't really use the PDFTranscoder but only the PDFDocumentGraphics2D in conjunction with JPS? If yes, you have to be aware that the faster text painting routines from the PDF Transcoder can only be used if Batik controls the painting. That's because Batik uses some special extensions to the Graphic2D interface that allows more sophisticated painting operations. Just printing to a Graphics2D (via JPS) results in even more of the text being painted as shapes which takes time because these extensions can't be used. That's probably the reason why you identified GraphicsNode.paint as time consuming.
If you say that PDFDocument.output() consumes a lot of time then please make sure that the OutputStream you write the output to is buffered (decorate with java.io.BufferedOutputStream). I've done some performance testing on FOP recently where I discovered that the PostScript renderer is about 50% slower if its OutputStream isn't buffered. On the other side, it didn't really make a big difference for the PDF output since most output is buffered in memory buffers anyway, though not with BufferedOutputStream. But I think it's worth to check. I'm not sure when the snapshot of FOP was taken for the Batik 1.5 release. There have been certain improvements in that part. I think you should consider upgrading to 1.6 so it's easier for us to help you. On 26.05.2005 05:41:20 Litton, Tom - CEPM wrote: > I've done some very crude performance testing (basically printing the > times to the log file), just to get an idea of what is happening. > > It seems you were right. Most of the time is spent in the call to > GraphicsNode.paint, but a non-significant amount of time is spent on the > call to PDFDocument.output. > > Whats stranger is the times vary greatly depending on the destination of > the file. Emailing the pdf is much quicker then printing it. I'm > guessing java's print api takes up alot of memory and slows things down? > > I'll try to get a hold of better tools (like JProbe). > > I hope you find this useful. > > By the way, i'm using batik 1.5. It looks like the PDFTranscoder is > rather old as well (not sure what version of fop it came from). > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
