I've manually set that to YES using IB3, and it did make a significant
 difference in loading time, pretty close to the near-instant time of
 TextEdit. However, when I try to scroll through the NSTextView using
 the scroll bar, it often becomes unresponsive. I'm assuming this is
 because only at that point is it rendering the layout for every
 section I scroll past, which would make sense. Though, TextEdit
 doesn't show this same behavior. So, I think it's a step closer!

 On Thu, Feb 28, 2008 at 10:12 PM, Ali Ozer <[EMAIL PROTECTED]> wrote:
 > TextEdit calls -[NSLayoutManager setAllowsNonContiguousLayout:YES];
 >  could that be it?
 >  Ali
 >
 >  On Feb 28, 2008, at 20:06 , Steven Degutis wrote:
 >
 >  > I have a large (ascii) text file, about 65 MB, which TextEdit loads
 >  > instantaneously in about a split second. I've tried to mimic this
 >  > behavior using NSTextView to no avail. The problem isn't about
 >  > unresponsiveness, because it's completely responsive during this
 >  > loading of the large text file. The problem is that the NSTextView
 >  > continuously loads the file over a period of about 30 seconds, not
 >  > instantly like TextEdit does. Browsing through TextEdit's source, I've
 >  > noticed that it removes all layout managers before the file is loaded
 >  > into the NSTextStorage, and re-adds them all back afterwards (using
 >  > NSEnumerator). When I tried to implement this into my own application,
 >  > it showed no difference in speed. Could this really be a major factor?
 >  > What other ways could I speed up a load of a large text file (several
 >  > hundred MB) into an NSTextView? Or, perhaps, is there a better Cocoa
 >  > control to use for large text files?
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to