• 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: Mutable/non-mutable bindings in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mutable/non-mutable bindings in NSTextView


  • Subject: Re: Mutable/non-mutable bindings in NSTextView
  • From: David <email@hidden>
  • Date: Mon, 6 Mar 2006 11:44:36 -0600


On Feb 25, 2006, at 7:48 PM, Greg Herlihy wrote:

I think a log could be well-suited for bindings, but not by modeling the
entire contents of the log as a single attribute. Since the entire, existing
log has to be copied each time a new entry is added, the expected
performance of adding an entry will degrade linearly, in direct proportion
to the size of the log. So doubling the size of the log would approximately
also double the amount of time it takes to add a new entry.

I tested this and after the NSTextView had about 200k and the application was using up 50% of the processor time (appending new line of text every second). I switched back to the "old" way of:


[[[rawLogView textStorage] mutableString] appendString:aString];

and the processor time is now less than 2% .

An example of why bindings is not good for everything!

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: [ANN] DMG Packager 1.0
  • Next by Date: Re: [NSTextView firstRectForCharacterRange:] returns empty rect
  • Previous by thread: Re: binding headertitle
  • Next by thread: [JOB] Developer position open at The Omni Group
  • Index(es):
    • Date
    • Thread