• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView replaceCharactersInRange performance and thread safety
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTextView replaceCharactersInRange performance and thread safety
      • From: David Kocher <email@hidden>
References: 
 >NSTextView replaceCharactersInRange performance and thread safety (From: David Kocher <email@hidden>)

  • Prev by Date: Re: KVO / NSArrayController question
  • Next by Date: NSOutlineViewDataSource on panel window
  • Previous by thread: NSTextView replaceCharactersInRange performance and thread safety
  • Next by thread: Re: NSTextView replaceCharactersInRange performance and thread safety
  • Index(es):
    • Date
    • Thread