Re: NSTextView very slow, any remedies?
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