
Hello,
Correct, the main issue is that sending text run to the WPF text formatter is about the most expensive part of SyntaxEditor performance-wise. When you pair that with an extremely long line, it can really affect performance. Yet text formatting is required to know how the various glyphs are displayed (syntax highlighting, font size, etc.) and arranged (hit testing, word wrapping, etc.). There is nothing new in the current version compared to v24.1.1 related to that.
We are currently working on SyntaxEditor updates, and revisiting this issue is one item on the list. We have seen some editors that have settings to work around similar issues, such as having a maximum number of characters where syntax highlighting can run on, or a maximum number of characters that can be tokenized on a line. We haven't dug into these ideas yet.
In the current version, reducing the number of characters "formatted" on a line is the key to preventing any performance issues for extremely long lines. One way to do this is by using collapsed regions. For instance if you have a 100,000 character line, you could display the first 1,000 and put a collapsed region over the next 8,900 and then just the first 1,000 and last 100 would show and be text formatted.
Another way is by as you said, pre-processing and injecting line breaks.
If you have other suggestions or seen options in other IDE applications that look like they help deal with this issue, it would be helpful to list them here as well for future evaluation. We are currently in some other areas of SyntaxEditor, but plan on looking into all of this in the coming months.