Re: NSTextView typing speed - slowdown at top?
Re: NSTextView typing speed - slowdown at top?
- Subject: Re: NSTextView typing speed - slowdown at top?
- From: SA Dev <email@hidden>
- Date: Wed, 28 Sep 2005 16:03:45 -0400
Keith:
You are inserting text near the beginning, which means the text
that occurs after it must be 'shifted'. Appending to the end is
easier because there is nothing to shift. Appending *near* the end
means there's less to shift but some. The closer you get to the
beginning, the more text needs to be shifted. The more shifting
around, the more layout needs to be performed, etc. Basically,
inserting near the beginning is more 'expensive'.
I think a more detailed technical explanation was already
presented on this list, though the keywords to search for are eluding
me at the moment (because I'm finding nothing). The above may be
oversimplistic (or largely inaccurate), but any applications using an
NSTextView will share in this problem - mine does.
- SADev
On Sep 28, 2005, at 3:51 PM, Keith Blount wrote:
Hello,
Is there any good reason why, on a long document
(1,000,000 characters), it would be much slower to
type at the top of an NSTextView than it is at the
bottom? This is what I am finding - if I insert the
cursor and start typing towards the beginning of my
text, there is a lag, but towards the end there is
none.
Admittedly, I am using a custom text storage that
provides a word count, but there is no reason why this
should slow down typing at the top of the text view
and not at the bottom (it keeps a running count by
counting only the affected sentence) - it should
either cause a slowdown throughout the whole text or
not at all.
If anyone has any ideas, I would be very grateful.
Best regards,
Keith
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to email@hidden
_______________________________________________
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