I have a subclassed NSTextView that I am manipulating in a separate thread (using performSelectorOnMainThread:withObject:waitUntilDone:) using selectors replaceCharactersInRange:withString:, setSelectedRange:, and insertText:. I'm experiencing flickering of text, and poor performance as the NSTextView updates the display for each and every operation.
Any suggestions on how to control when the display is updated, so I can update it only when actually needed? I tried using various combinations setNeedsDisplay:NO (from both the main and background threads, before and after my updates) which seems to be ignored.
Thanks in advance to anyone who can provide some insight.