Re: NSTextView replaceCharactersInRange performance and thread safety
Re: NSTextView replaceCharactersInRange performance and thread safety
- Subject: Re: NSTextView replaceCharactersInRange performance and thread safety
- From: Douglas Davidson <email@hidden>
- Date: Tue, 4 Jan 2005 12:05:14 -0800
On Jan 4, 2005, at 11:51 AM, David Kocher wrote:
The implementation of "replaceCharactersInRange" and
"scrollRangeToVisible" in NSTextView seems to be *very* slow making it
impossible for me to use a NSTextView for logging. The problem has
also been discussed at [
http://www.cocoadev.com/index.pl?FastWritesToNSTextView ] with no
solution provided it seems.
I also had infrequent crashes when calling the above methods from a
different thread than the main thread; it seems it isn't thread safe.
I notice that you are calling setFont: on the text view, which could
potentially cause the whole text to be relaid. Try creating an
attributed string with your desired font and inserting that into the
text at the end.
Douglas Davidson
_______________________________________________
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