Re: Mutable/non-mutable bindings in NSTextView
Re: Mutable/non-mutable bindings in NSTextView
- Subject: Re: Mutable/non-mutable bindings in NSTextView
- From: David <email@hidden>
- Date: Mon, 6 Mar 2006 11:44:36 -0600
On Feb 25, 2006, at 7:48 PM, Greg Herlihy wrote:
I think a log could be well-suited for bindings, but not by
modeling the
entire contents of the log as a single attribute. Since the entire,
existing
log has to be copied each time a new entry is added, the expected
performance of adding an entry will degrade linearly, in direct
proportion
to the size of the log. So doubling the size of the log would
approximately
also double the amount of time it takes to add a new entry.
I tested this and after the NSTextView had about 200k and the
application was using up 50% of the processor time (appending new
line of text every second). I switched back to the "old" way of:
[[[rawLogView textStorage] mutableString] appendString:aString];
and the processor time is now less than 2% .
An example of why bindings is not good for everything!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden