davidmoten / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail
Other
141 stars 38 forks source link

Stack on socket read Bdat command #116

Open valenpo opened 9 months ago

valenpo commented 9 months ago

Hi @davidmoten, I get a problem with Bdat read, it is very slow. Maybe we can wrap it with buffer? Or return BufferedInputStream from Session.getRawInputStream()

Screenshot 2023-10-12 at 10 39 28
davidmoten commented 9 months ago

a BufferedInputStream is already in place, you can see it in the stack trace in your picture. I wonder if we need to put it in a different place?

davidmoten commented 9 months ago

as in change the order of the stream wrapping

valenpo commented 9 months ago

I think we should buffer the Session.getRawStream(), as if where is nothing on buffer it will fill it with provided buffer size.