Re: PDF transcoder performance

"Johan Stuyts" <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
>    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
>    BufferedOutputStream outputBuff = new  
> BufferedOutputStream(outputStream);

There is no performance gain in buffering an in-memory output stream. You  
will likely see a tiny decrease in performance instead.

I am pretty sure that you won't notice any difference, but what you can  
try is to start with a bigger buffer size (e.g. 1 MB) to prevent some  
copying of the data as it grows:
<http://docs.oracle.com/javase/6/docs/api/java/io/ByteArrayOutputStream.html#ByteArrayOutputStream(int)>

Regards,

Johan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.