changing text attributes in document in JTextPane
i have performance issue in that case. i have a doc having about several handreds of kb of text.
when i try to color a doc with particular scheme using setCharacterAttributes, say, highlight keywords and grey some other words it takes sooo long...
i looked through the code and found that each call to setCharacterAttributes contains synchronization locks. i think it's a reason of perf degradation. so i gave up changing text attrs and hignlight what i need just painting over JTextPane. but as for me that's bad ;(
is there a "fair way" to change character attributes of Document contatining text of ~500kb in acceptable time?