Click here to Skip to main content
15,911,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 9:21
protectorAspDotNetDev8-Jun-10 9:21 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 10:12
mveDave Kreskowiak8-Jun-10 10:12 
GeneralRe: making a text box more efficient Pin
Pete O'Hanlon8-Jun-10 10:42
mvePete O'Hanlon8-Jun-10 10:42 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 12:09
mveDave Kreskowiak8-Jun-10 12:09 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 10:47
protectorAspDotNetDev8-Jun-10 10:47 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 11:03
sitebuilderLuc Pattyn8-Jun-10 11:03 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 12:45
protectorAspDotNetDev8-Jun-10 12:45 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 12:59
sitebuilderLuc Pattyn8-Jun-10 12:59 
In reality a StringBuilder too behaves quadratically, albeit at a lower frequency: its capacity grows by doubling its size and copying characters any time it is getting full, just like the internal arrays of Lists and other collections. So a number of strings get appended for free, then a new buffer twice the current capacity get allocated and all data copied, etc. Better than copying everything on every new line of text, but still quadratic.

While a ListBox is linear, except for the collection holding the references to the items, that too would double its capacity once in a while.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 13:19
protectorAspDotNetDev8-Jun-10 13:19 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 13:26
sitebuilderLuc Pattyn8-Jun-10 13:26 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 13:59
protectorAspDotNetDev8-Jun-10 13:59 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 14:06
sitebuilderLuc Pattyn8-Jun-10 14:06 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 14:16
protectorAspDotNetDev8-Jun-10 14:16 
GeneralRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 14:28
sitebuilderLuc Pattyn8-Jun-10 14:28 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 12:24
mveDave Kreskowiak8-Jun-10 12:24 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 12:57
protectorAspDotNetDev8-Jun-10 12:57 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak8-Jun-10 17:21
mveDave Kreskowiak8-Jun-10 17:21 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 17:34
protectorAspDotNetDev8-Jun-10 17:34 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak9-Jun-10 2:03
mveDave Kreskowiak9-Jun-10 2:03 
GeneralRe: making a text box more efficient Pin
AspDotNetDev9-Jun-10 5:39
protectorAspDotNetDev9-Jun-10 5:39 
GeneralRe: making a text box more efficient Pin
LookSharp8-Jun-10 17:24
LookSharp8-Jun-10 17:24 
GeneralRe: making a text box more efficient Pin
Dave Kreskowiak9-Jun-10 2:01
mveDave Kreskowiak9-Jun-10 2:01 
GeneralRe: making a text box more efficient Pin
LookSharp9-Jun-10 3:19
LookSharp9-Jun-10 3:19 
AnswerRe: making a text box more efficient Pin
Luc Pattyn8-Jun-10 6:57
sitebuilderLuc Pattyn8-Jun-10 6:57 
GeneralRe: making a text box more efficient Pin
AspDotNetDev8-Jun-10 9:22
protectorAspDotNetDev8-Jun-10 9:22 

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.