• 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: TextEdit-speed file loading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextEdit-speed file loading


  • Subject: Re: TextEdit-speed file loading
  • From: Ali Ozer <email@hidden>
  • Date: Thu, 28 Feb 2008 20:12:19 -0800

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 (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


References: 
 >TextEdit-speed file loading (From: "Steven Degutis" <email@hidden>)

  • Prev by Date: TextEdit-speed file loading
  • Next by Date: Fwd: TextEdit-speed file loading
  • Previous by thread: TextEdit-speed file loading
  • Next by thread: Fwd: TextEdit-speed file loading
  • Index(es):
    • Date
    • Thread