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 Steven Moore
re-created every time I update the string or something? On Jun 3, 2008, at 5:51 PM, Nick Zitzmann wrote: 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

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 textStorage]

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 paragraph