Lagging display with big tokens

SyntaxEditor for WPF Forum

Posted 5 years ago by Martin de Jong - Statistics Netherlands
Version: 13.1.0592
Avatar

Hi

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 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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 (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.