Question about text colouring in NSTextView

Dear Members,

I need help and have a question about the performance oftext coloring in NSTextView. I have used NSAttributedString and NSForegroundColorAttributeName,NSBackgroundColorAttributeName to color the string about 20 000 characters andmore. I have found quite significant slow down depending on number of colours, and whether Iuse NSForegroundColorAttributeName or NSBackgroundColorAttributeName. It ismatter of seconds and minutes !!! It makes almost not possible to work with a stringof thousands up to millions of characters, which is standard to work with DNAsequences (sequences composed by A, T, G and C). Is there a hope to solve thisproblem ? I have asked this question on arrays - How to use colour for text colouring without slowing down the process? - Stack Overflow. No answer. This bad thing is blocking Swift usagefor molecular biology.Best wishes,

Valery

Your question is related to Apple’s Cocoa UI frameworks, but this list is focused on the Swift language itself (and its core libraries.) I suggest you ask on Apple’s developer support forums.

(I would have suggested the excellent cocoa-dev mailing list hosted by Apple, but it and all the other Apple developer lists have been offline for more than a week … I don’t know if this is temporary or if Apple finally pulled the plug on them.)

—Jens

···

On Feb 4, 2017, at 6:03 AM, Valera Tarasov via swift-users <swift-users@swift.org> wrote:

Dear Members,
I need help and have a question about the performance of text coloring in NSTextView.

This is being investigated (INC063170897).

Share and Enjoy

···

On 6 Feb 2017, at 19:16, Jens Alfke via swift-users <swift-users@swift.org> wrote:

Apple developer lists have been offline for more than a week them.

--
Quinn "The Eskimo!" <http://www.apple.com/developer/&gt;
Apple Developer Relations, Developer Technical Support, Core OS/Hardware