TextEdit-speed file loading
TextEdit-speed file loading
- Subject: TextEdit-speed file loading
- From: "Steven Degutis" <email@hidden>
- Date: Thu, 28 Feb 2008 22:06:43 -0600
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 (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