Loading large # of characters into a Text Area

Hello,

I am downloading a very large amount of content with URLConnection(“GET”,URL,15). I then place the contents into a TextArea for viewing. The content length is about 29 million characters long.

In the ContentReceived handler I place the content into the TextArea and indicate all is done with a “Done” message box followed by the length of Content and the length of the TextArea.Text. This all happens pretty quickly and both lengths agree with the 29M number.

However, it seems to take many seconds after my 'DONE" message for the TextArea to completely fill with the content. I can tell this because scrolling to the bottom of the TextArea shows partial loads until all of the content is there. Loading the TextArea seems to be a process outside my code layer. Is this just a UI process I should not be worried about? My concern is I might try to operate on the content of the TextArea before it is all there.

Thank you,

the textarea is really not made for handling a huge amount of characters.
it does it but becomes very slow with huge numbers of chars.

may be this can help :

That is helpful. Thank you.

For future readers, I also found this article useful.

Dan

Same tip. Mine is a bit more user-friendly as I wrapped it into an extension method, so you simply write

TextArea1.BeginFastEditing
// do your stuff
TextArea1.EndFastEditing

without having to remember the nitty-gritty …