Click here to Skip to main content
16,007,932 members
Home / Discussions / C#
   

C#

 
AnswerRe: Port 25!!!!????? Pin
mav.northwind23-Feb-05 0:32
mav.northwind23-Feb-05 0:32 
GeneralDownloading Files Pin
Dylan van Heerden22-Feb-05 20:39
Dylan van Heerden22-Feb-05 20:39 
GeneralRe: Downloading Files Pin
Rei Miyasaka23-Feb-05 0:44
Rei Miyasaka23-Feb-05 0:44 
GeneralRe: Downloading Files Pin
Sebastian Schneider23-Feb-05 0:45
Sebastian Schneider23-Feb-05 0:45 
GeneralSysteminformatiom.Network not working Pin
sharathgowda22-Feb-05 20:25
sharathgowda22-Feb-05 20:25 
GeneralCount no of Children in DirectoryEntry Pin
Adnan Siddiqi22-Feb-05 20:01
Adnan Siddiqi22-Feb-05 20:01 
GeneralRe: Count no of Children in DirectoryEntry Pin
kaangonel24-Feb-05 2:21
kaangonel24-Feb-05 2:21 
QuestionRichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
Rei Miyasaka22-Feb-05 16:22
Rei Miyasaka22-Feb-05 16:22 
Has anyone noticed AppendText being really really slow? It causes a Gen 0 garbage collection almost every call, and even more frequently as the text grows.

I looked at the AppendText code with .NET Reflector[^], and it turns out that that AppendText calls set_SelectedText, which does a lot.

set_SelectedText uses some SendMessage calls if base.IsHandleCreated, and otherwise splits all of the original text into two strings, and then concats them back into a new string which the Text property is assigned to. That's two new strings half the size of the whole text, and another string the size of the whole thing -- not too surprising that it's so inefficient.

I learned that SetStyle(ControlStyles.CacheText, true); is a remedy, but somehow it hasn't made any difference. I also tried checking to make sure base.IsHandleCreated is true, and surely enough it is, but in that case, it shouldn't even be doing much in managed code.

Any ideas? Thanks in advance.
AnswerRe: RichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
S. Senthil Kumar22-Feb-05 17:58
S. Senthil Kumar22-Feb-05 17:58 
GeneralRe: RichTextBox / TextBoxBase AppendText GCing like mad -- SetStyle isn't working? Pin
Rei Miyasaka22-Feb-05 18:08
Rei Miyasaka22-Feb-05 18:08 
GeneralOpen socket to a smtp server Pin
kokain22-Feb-05 15:49
kokain22-Feb-05 15:49 
GeneralRe: Open socket to a smtp server Pin
S. Senthil Kumar22-Feb-05 16:11
S. Senthil Kumar22-Feb-05 16:11 
GeneralRe: Open socket to a smtp server Pin
kokain22-Feb-05 16:29
kokain22-Feb-05 16:29 
GeneralRe: Open socket to a smtp server Pin
S. Senthil Kumar22-Feb-05 17:51
S. Senthil Kumar22-Feb-05 17:51 
GeneralPrinting rich text with a background color Pin
Anonymous22-Feb-05 11:29
Anonymous22-Feb-05 11:29 
GeneralRe: Printing rich text with a background color Pin
Rei Miyasaka23-Feb-05 0:50
Rei Miyasaka23-Feb-05 0:50 
GeneralThank you, but my problem is... Pin
JarrodPeace23-Feb-05 6:17
JarrodPeace23-Feb-05 6:17 
Generalset listBox item color Pin
Adnan Siddiqi22-Feb-05 9:19
Adnan Siddiqi22-Feb-05 9:19 
GeneralRe: set listBox item color Pin
Heath Stewart22-Feb-05 12:41
protectorHeath Stewart22-Feb-05 12:41 
GeneralRe: set listBox item color Pin
Adnan Siddiqi22-Feb-05 19:53
Adnan Siddiqi22-Feb-05 19:53 
GeneralLabel Click Event Location Pin
Dominic Farr22-Feb-05 8:42
Dominic Farr22-Feb-05 8:42 
GeneralRe: Label Click Event Location Pin
Heath Stewart22-Feb-05 12:40
protectorHeath Stewart22-Feb-05 12:40 
QuestionHow to create MainMenu Designer. Pin
xenophy22-Feb-05 8:06
xenophy22-Feb-05 8:06 
AnswerRe: How to create MainMenu Designer. Pin
Heath Stewart22-Feb-05 12:35
protectorHeath Stewart22-Feb-05 12:35 
GeneralIs it easy to migrate from VB.net to C# Pin
MyThread22-Feb-05 5:46
MyThread22-Feb-05 5:46 

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.