@Gerolkae,
Your "scrolling performance" issue is really a "lexer performance" issue. To successively attempt to match regular expressions against the unstyled content will simply take too long. In short, that approach doesn't scale... and a quick scroll on a long document makes that obvious.
This thread is old and we have better examples now on how to write a custom lexer. You should check out @blah38621's WPF branch. The WPF portions of it are irrelevant for you, but the custom lexer implementations show best practices. He also details some of his work in this thread:
https://scintillanet.codeplex.com/discussions/435975#post1012843
Cheers,
Jacob
Your "scrolling performance" issue is really a "lexer performance" issue. To successively attempt to match regular expressions against the unstyled content will simply take too long. In short, that approach doesn't scale... and a quick scroll on a long document makes that obvious.
This thread is old and we have better examples now on how to write a custom lexer. You should check out @blah38621's WPF branch. The WPF portions of it are irrelevant for you, but the custom lexer implementations show best practices. He also details some of his work in this thread:
https://scintillanet.codeplex.com/discussions/435975#post1012843
Cheers,
Jacob