james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Re: Efficiency and Profiling
Date Thu, 13 Jan 2005 03:53:13 GMT
Gabor Kincses wrote:
> Are there any pointers to profiling results?

I'm not sure what you mean.  Pure throughput records, or where things 
are slow, or what?

> In particular how efficient is the following code
> snippet from MimeMessageInputStreamSource.java:
>    while ((b = in.read()) != -1) {
>        out.write(b);
>    }

That's bad in terms of the number of method calls it is generating and 
should be done as reading a block of bytes at a time.

> Here "out" is a BufferedOutputStream, but "in" appears
> to be a SequenceInputStream on non-buffered
> FilterInputStream derivates.

There probably isn't a lot that can be done about the source and target, 
and it's hard to make a black and white judgement without context.

Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message