c*******t 发帖数: 32 | 1 【 以下文字转载自 Programming 讨论区 】
【 原文由 coldstart 所发表 】
My program:
Using thread for each connention.
Using BufferedInputStream and BufferedReader to get message from client.
Using readLine() to get each line from client.
Problem:
When there are attachments coming in. SMTP server receive them very slowly.
If I increase the buffer size, that will be fine for one email with big
attachment.
But don't work on a lot of email coming in at once. The error is Outofmemory.
What shall I do to increase the speed | c*******t 发帖数: 32 | 2 发现开了100M buffer, 对100K的附件处理的很快了,
但如果附件有500K,还是很慢,要4分钟. 不知什么原因?
【在 c*******t 的大作中提到】 : 【 以下文字转载自 Programming 讨论区 】 : 【 原文由 coldstart 所发表 】 : My program: : Using thread for each connention. : Using BufferedInputStream and BufferedReader to get message from client. : Using readLine() to get each line from client. : Problem: : When there are attachments coming in. SMTP server receive them very slowly. : If I increase the buffer size, that will be fine for one email with big : attachment.
|
|