Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: speech recogntion Pin
Christian Graus22-Jan-06 14:47
protectorChristian Graus22-Jan-06 14:47 
GeneralRe: speech recogntion Pin
Colin Angus Mackay22-Jan-06 20:44
Colin Angus Mackay22-Jan-06 20:44 
GeneralRe: speech recogntion Pin
ekynox23-Jan-06 0:48
ekynox23-Jan-06 0:48 
GeneralRe: speech recogntion Pin
Colin Angus Mackay23-Jan-06 0:57
Colin Angus Mackay23-Jan-06 0:57 
GeneralRe: speech recogntion Pin
mahmoud_sam23-Jan-06 22:31
mahmoud_sam23-Jan-06 22:31 
GeneralRe: speech recogntion Pin
mahmoud_sam23-Jan-06 22:25
mahmoud_sam23-Jan-06 22:25 
QuestionHashtable memory use Pin
theanton22-Jan-06 12:25
theanton22-Jan-06 12:25 
QuestionStreamReader/Writer speed Pin
User 665822-Jan-06 11:55
User 665822-Jan-06 11:55 
Hi!

currently I'm developing my own little mail server (SMTP and POP3).
It works fine so far, but I'm concerned about the speed of my application.
This is, what I use for sending a mail back to a client:

StreamReader lineReader = new StreamReader(new MemoryStream(mail.Data));
while((line = lineReader.ReadLine()) != null)
{
   writer.Write(line + "\r\n");
   writer.Flush();
}


Even when sending the mail locally via 127.0.0.1 the transfer is very slow, about 100-300Kb per second.
What are the problems here?

One problem I'm aware of is the string concatenation like line + "\r\n". I think I need to use a StringBuilder here, but how to use it correctly in this loop?

Does anyone see any other performance hits here?

regards

modified 12-Sep-18 21:01pm.

AnswerRe: StreamReader/Writer speed Pin
Christian Graus22-Jan-06 12:18
protectorChristian Graus22-Jan-06 12:18 
GeneralRe: StreamReader/Writer speed Pin
User 665822-Jan-06 12:27
User 665822-Jan-06 12:27 
GeneralRe: StreamReader/Writer speed Pin
Christian Graus22-Jan-06 12:30
protectorChristian Graus22-Jan-06 12:30 
GeneralRe: StreamReader/Writer speed Pin
User 665822-Jan-06 12:33
User 665822-Jan-06 12:33 
GeneralRe: StreamReader/Writer speed Pin
Christian Graus22-Jan-06 12:35
protectorChristian Graus22-Jan-06 12:35 
AnswerRe: StreamReader/Writer speed Pin
Phil J Pearson23-Jan-06 2:35
Phil J Pearson23-Jan-06 2:35 
GeneralRe: StreamReader/Writer speed Pin
User 665823-Jan-06 8:38
User 665823-Jan-06 8:38 
GeneralRe: StreamReader/Writer speed Pin
Phil J Pearson23-Jan-06 9:29
Phil J Pearson23-Jan-06 9:29 
Question[Message Deleted] Pin
tota_122-Jan-06 11:35
tota_122-Jan-06 11:35 
AnswerRe: boolean equation Pin
Christian Graus22-Jan-06 11:45
protectorChristian Graus22-Jan-06 11:45 
GeneralRe: boolean equation Pin
Paul Conrad22-Jan-06 14:58
professionalPaul Conrad22-Jan-06 14:58 
GeneralRe: boolean equation Pin
Dave Kreskowiak22-Jan-06 16:00
mveDave Kreskowiak22-Jan-06 16:00 
GeneralRe: boolean equation Pin
DavidNohejl22-Jan-06 20:57
DavidNohejl22-Jan-06 20:57 
GeneralRe: boolean equation Pin
Paul Conrad23-Jan-06 3:27
professionalPaul Conrad23-Jan-06 3:27 
QuestionFinal Package creation Pin
ranzask22-Jan-06 11:13
ranzask22-Jan-06 11:13 
AnswerRe: Final Package creation Pin
ekynox22-Jan-06 12:05
ekynox22-Jan-06 12:05 
Questionhow to launch Internet Explorer with a link Pin
ranzask22-Jan-06 11:08
ranzask22-Jan-06 11:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.