Slow performance in JTextPane
Hi, I have developed a text editor using JTextPane, with syntax highlighting and all other things that a text editor should do, however there is one problem. When I load a huge file, like 17000 lines, the performance only for that text pane becomes slow. The situation is: there is a tabbed pane and there are a few text pane loaded on that tabbed pane, when one of the text panes have a huge file loaded in it, the performance only on that pane becomes slow, the typeing becomes slow and it takes a little time for the pane to react to the key events. but in other panes the performance is okay. So why is that?
And the memory usage goes dramatically high up when I have a file of about 17000 lines, and when I remove that tab from the tabbed pane, the memory usage stays high and doen't change. I tried to set the compoent to null, explicitly calling gc and everythign I could come up with but still after closing a tab, the memory usage is still high and it seems that it does not release the resource.
any idea would be appreciated.