• 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 very slow, any remedies?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView very slow, any remedies?


  • Subject: Re: NSTextView very slow, any remedies?
  • From: Erik Buck <email@hidden>
  • Date: Thu, 26 Feb 2009 13:44:16 -0800 (PST)

Why is NSTextView slow for you ?  What profiling have you done, and what does it say is taking all the time ?
 
I have used NSTextView happily with 100 MB text files before. 
 
I have seen slow behavior under the following conditions:
- Change the text content (NSTextStorage) from within -drawRect: or one of the layout methods.  This is unsupported and in the best case causes combinatorial re-layout.  In the worst case it produces incorrect display. Don't do this.
- Pragmatically insert text just before the visible page: NSTextView may have to perform page layout of text before it can redraw the visible page.  The solution that works for me is to coalesce frequent changes to text and perform fewer total inserts.
- Use of complex text containers.  They need to be fast in order to keep layout fast.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: One IBAction, multiple results from multiple methods
  • Next by Date: Re: NSTextView trackingArea problem
  • Previous by thread: NSTextView very slow, any remedies?
  • Next by thread: OutlineView with custom TableColumn cell doesn't redisplay when losing focus
  • Index(es):
    • Date
    • Thread