You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Gabor Kincses <np...@yahoo.com> on 2005/01/13 04:14:02 UTC
Efficiency and Profiling
Hello,
Are there any pointers to profiling results?
In particular how efficient is the following code
snippet from MimeMessageInputStreamSource.java:
while ((b = in.read()) != -1) {
out.write(b);
}
Here "out" is a BufferedOutputStream, but "in" appears
to be a SequenceInputStream on non-buffered
FilterInputStream derivates.
Thanks,
Gabor
=====
Gabor Kincses
Running Mandrake Linux 10.0
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Efficiency and Profiling
Posted by Gabor Kincses <np...@yahoo.com>.
--- Serge Knystautas <se...@lokitech.com> wrote:
> 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?
Was hoping that somebody has profiled James and has
identified some of the hot spots and put them into a
todo list of some sort.
> > 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.
I'll try to replace the above with a more meaningful
blocking read and see if that makes any difference. I
guess I should also see what a profiler turns up.
Thanks,
Gabor
> > 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
>
=====
Gabor Kincses
Running Mandrake Linux 10.0
__________________________________
Do you Yahoo!?
Yahoo! Mail - 250MB free storage. Do more. Manage less.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Efficiency and Profiling
Posted by Serge Knystautas <se...@lokitech.com>.
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