Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: Listview format problem - need help! Pin
Christian Graus22-Jan-06 15:59
protectorChristian Graus22-Jan-06 15:59 
GeneralRe: Listview format problem - need help! Pin
OnlyTaz22-Jan-06 16:05
OnlyTaz22-Jan-06 16:05 
GeneralRe: Listview format problem - need help! Pin
OnlyTaz22-Jan-06 16:13
OnlyTaz22-Jan-06 16:13 
GeneralRe: Listview format problem - need help! Pin
Christian Graus22-Jan-06 16:14
protectorChristian Graus22-Jan-06 16:14 
GeneralRe: Listview format problem - need help! Pin
OnlyTaz22-Jan-06 16:40
OnlyTaz22-Jan-06 16:40 
GeneralRe: Listview format problem - need help! Pin
Christian Graus22-Jan-06 16:42
protectorChristian Graus22-Jan-06 16:42 
GeneralRe: Listview format problem - need help! Pin
OnlyTaz22-Jan-06 16:50
OnlyTaz22-Jan-06 16:50 
GeneralRe: Listview format problem - need help! Pin
Vikram A Punathambekar22-Jan-06 21:29
Vikram A Punathambekar22-Jan-06 21:29 
QuestionDotnet Framework V2 : serialport class ? Pin
youssef22-Jan-06 13:10
youssef22-Jan-06 13:10 
Questionspeech recogntion Pin
mahmoud_sam22-Jan-06 12:56
mahmoud_sam22-Jan-06 12:56 
AnswerRe: speech recogntion Pin
ekynox22-Jan-06 13:16
ekynox22-Jan-06 13:16 
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 
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 
Christian Graus wrote:
First of all, unstead of \r\n, use Environment.NewLine.


The SMTP and POP3 protocols require data to be ended with CRLF, but some operating systems use something different as NewLine, so I do a "\r\n"

Christian Graus wrote:
hen, a stringbuilder gets created before the loop, you add your strings in the loop ( but add the newline on a seperate line, or you're still concatenating strings as you go ). Then use the ToString method to get your string at the end.


That's what I just implemented. Looks like I had the same idea

Christian Graus wrote:
The calls to Flush are also expensive and unnecessary, flush once at the end if you need to.


Won't this create a terribly large string in memory when I send mails with attachments of several megabytes in size?

Right now the client receives my mails with about 500-800Kbytes/sec, this is a little improvement, but I think this can be done faster.
Okay, using writer.Flush() after the loop makes the whole thing pretty fast, definately >1Mbyte/sec, but what about memory consumption?

regards

-- modified at 18:29 Sunday 22nd January, 2006

modified 12-Sep-18 21:01pm.

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 

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.