Unnecessary array allocation and copying

2004-04-26 Thread Ugo Cei
While browsing our sources, I came across this snippet from o.a.c..components.pipeline.AbstractProcessingPipeline: // execute the pipeline: this.generator.generate(); byte[] data = os.toByteArray();

Re: Unnecessary array allocation and copying

2004-04-26 Thread Bruno Dumon
On Mon, 2004-04-26 at 22:39, Ugo Cei wrote: While browsing our sources, I came across this snippet from o.a.c..components.pipeline.AbstractProcessingPipeline: // execute the pipeline: this.generator.generate(); byte[] data =

Re: Unnecessary array allocation and copying

2004-04-26 Thread Ugo Cei
Il giorno 26/apr/04, alle 23:19, Bruno Dumon ha scritto: The same pattern occurs at other locations also, e.g. AbstractCachingProcessingPipeline line 246 Yes, there are four occurrences between AbstractProcessingPipeline and AbstractCachingProcessingPipeline. I've optimized all four locally and

Re: Unnecessary array allocation and copying

2004-04-26 Thread Sylvain Wallez
Ugo Cei wrote: While browsing our sources, I came across this snippet from o.a.c..components.pipeline.AbstractProcessingPipeline: // execute the pipeline: this.generator.generate(); byte[] data = os.toByteArray();