Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-05 Thread Steven Moore
Heh, whoops. Maybe I should read the documentation better. The warning is already there, I just missed it: NSTextStorage also defines a set of methods ... useful for getting and setting scriptable properties of NSTextStorage objects... In particular, using thecharacters, words or

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-05 Thread Douglas Davidson
On Jun 5, 2008, at 2:40 PM, Steven Moore wrote: Heh, whoops. Maybe I should read the documentation better. The warning is already there, I just missed it: NSTextStorage also defines a set of methods ... useful for getting and setting scriptable properties of NSTextStorage objects... In

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-04 Thread Ross Carter
On Jun 3, 2008, at 9:32 PM, Nick Zitzmann wrote: On Jun 3, 2008, at 7:25 PM, Steven Moore wrote: It looks like most of the calls are coming from [NSArray indexOfObjectIdenticalTo:], half of which are from [NSSubTextStorage release] and [NSTextStorage removeLayoutManager:]. I'm not

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-04 Thread Steven Moore
Have you tried turning on GC? At least that will move object finalization into a background thread. You might want to look at NSLayoutManager - setAllowsNonContiguousLayout: With both of these changes in place, and a bit of optimization on my part (apparently, [[myTextView

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-04 Thread Douglas Davidson
On Jun 4, 2008, at 3:54 PM, Steven Moore wrote: With both of these changes in place, and a bit of optimization on my part (apparently, [[myTextView textStorage] paragraphs] comes with a lot of overhead.. not surprising, when I think about it), my app is in much better shape. I think the

NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-03 Thread Steven Moore
I'm trying to use an NSTextView to display the output of a shell script, but when my script outputs too much data, too quickly (on the order of a dozen lines nearly simultaneously), my app gives up with a pinwheel. I'm using an NSPipe to get the data, readInBackgroundAndNotify to know when

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-03 Thread Nick Zitzmann
On Jun 3, 2008, at 6:43 PM, Steven Moore wrote: I'm trying to use an NSTextView to display the output of a shell script, but when my script outputs too much data, too quickly (on the order of a dozen lines nearly simultaneously), my app gives up with a pinwheel. I'm using an NSPipe to get

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-03 Thread Steven Moore
It looks like most of the calls are coming from [NSArray indexOfObjectIdenticalTo:], half of which are from [NSSubTextStorage release] and [NSTextStorage removeLayoutManager:]. I'm not exactly sure why, as I didn't think I was directly touching the layout manager.. is it being re-created

Re: NSTextView causes lockups when appending too quickly and/or scrolling

2008-06-03 Thread Nick Zitzmann
On Jun 3, 2008, at 7:25 PM, Steven Moore wrote: It looks like most of the calls are coming from [NSArray indexOfObjectIdenticalTo:], half of which are from [NSSubTextStorage release] and [NSTextStorage removeLayoutManager:]. I'm not exactly sure why, as I didn't think I was directly