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