• 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: TextView question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextView question


  • Subject: Re: TextView question
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 15 Aug 2006 15:37:00 -0700


On Aug 11, 2006, at 10:33 AM, Jason Jasmin wrote:

I've tried the various options that have been presented so far, and haven't seen a noticable performance difference. When doing all the logic of adding my log message to the NSTextView, but without calling scrollRangeToVisible:, it takes about 1ms per loop iteration (as deduced by looking at the timestamps on my NSLog calls in XCode). When I enable scrolling (either by calling scrollRangeToVisible: directly, or by cancelling the previous request as suggested by Andreas, it takes ~20ms per loop.


The approach that I believe several people have used successfully in this case is to avoid calling scrollRangeToVisible: immediately, but instead to call it only when layout is complete (as reported by NSLayoutManager delegate methods).


For Leopard we have added options to NSLayoutManager that should make this sort of workaround unnecessary. Those using Leopard can read the AppKit release notes to find out more about this.

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


References: 
 >TextView question (From: Jason Jasmin <email@hidden>)
 >Re: TextView question (From: Andreas Mayer <email@hidden>)
 >Re: TextView question (From: Jason Jasmin <email@hidden>)
 >Re: TextView question (From: Spencer Salazar <email@hidden>)
 >Re: TextView question (From: Jason Jasmin <email@hidden>)

  • Prev by Date: NSDocument open/new file problem when model object instance is in nib.
  • Next by Date: Re: Cocoa-dev Digest, Vol 3, Issue 1030
  • Previous by thread: Re: TextView question
  • Next by thread: Strange memory leak with AsyncSocket and multithreading
  • Index(es):
    • Date
    • Thread