Re: Slow horizontal scrolling w/NSMutableAttributedStrings
Re: Slow horizontal scrolling w/NSMutableAttributedStrings
- Subject: Re: Slow horizontal scrolling w/NSMutableAttributedStrings
- From: Matt Neuburg <email@hidden>
- Date: Tue, 24 May 2005 18:58:43 -0700
On Tue, 24 May 2005 15:07:16 -0700, "John H. Lee" <email@hidden>
said:
>
>I'm building an app that contains a single NSTableView with one
>column. My data source is an NSMutableArray of
>NSMutableAttributedStrings. Each of these strings contains up to a
>few thousand characters with about half of the characters having
>background colors set.
>
>Vertical scrolling is fine, but horizontal scrolling is very slow.
>If I leave the strings unattributed, horizontal scrolling is much
>faster. When scrolling vertically by one row, only that new row is
>retrieved from my data source. Horizontal scrolling requires
>retrieval of all visible rows (~30). The problem persists if I use
>an NSTextView instead of NSTableView. All of this leads me to
>believe that my data source is plenty efficient (just an [array
>objectAtIndex:row]), so the problem must lie in the rendering of lots
>o' attributed strings.
>
>Any suggestions here?
Consider a different interface. Is it really necessary to display strings "a
few thousand characters" in length in a horizontal non-wrapping view? Why
require horizontal scrolling at all? This doesn't sound like a very pleasant
way to read text; one is not accustomed to scrolling horizontally again and
again in this manner. Why not show just the first few characters of each
string, and use an inspector architecture so that when the user clicks on a
row, the whole string shows up in some other piece of interface, such as a
regular, old-fashioned, wrapping NSTextView? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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