Lagging display with big tokens

SyntaxEditor for WPF Forum

Posted 10 years ago by Martin - Blaise - Statistics Netherlands
Version: 13.1.0592


When you have a big multiline token, like a comment of 1000 lines, the scrolling, navigation in the editor is very slow. it seems that the lexing takes the regular amount of calls (using MergableLexerBase) and time to process. Splitting this one big token in multiple ones speeds up navigation a lot. Have you an idea what is causing this?

Comments (1)

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Martin,

Yes that is expected since as you scroll around, it's doing some lexing on the fly as new lines are added.  This is part of the view line virtualization features.  But since your line is thousands of lines long, it is having to scan a very long section of text and that could lag things.  I would recommend breaking things up into one token per line instead for this scenario.  That will keep performance very fast.

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.