james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: new InputStream class for mail data
Date Wed, 16 Jul 2003 16:48:35 GMT
> Since we are talking about improving SMTP data handler
> class I want to draw attention to some performance
> issues I had found earlier while analyzing
> CharTerminatedInputStream class.

> The point of major concern was the use of read method
> to read data from Socket InputStream. for example if
> we consider an average mail size of 40KB, read method
> will be called 40 x 1024 = 40960

This seems to be factually wrong.  Consider the following:

            in = new BufferedInputStream(socket.getInputStream(), 1024);
            inReader = new CRLFTerminatedReader(in, "ASCII");
            InputStream msgIn = new CharTerminatedInputStream(in,
SMTPTerminator);

In all cases, the filtered data is coming through BufferedInputStream with a
1K buffer.

> I have used PushBackInputStram and block read method

I would like to hear more about what you did, but as noted above, I don't
believe that you are correct in your initial analysis.

	--- Noel


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


Mime
View raw message