Lexical parsing in the background

SyntaxEditor for Windows Forms Forum

Posted 10 years ago by liggett78
Version: 4.0.0280
Avatar
I've just started working with SyntaxEditor and I'm wondering whether it is safe to let it do the lexical parsing in the background? Basically I'm setting the document's text on the main thread and kicking off the background worker, which will assign a loaded dynamic language to the document and set its LexicalParsingEnabled to true in order to get the text colorized.

In case this is possible, is the parsing automagically stopped when the form is closed and the SyntaxEditor instance destroyed?

Thanks.

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It probably isn't a good idea to try and do lexical parsing in the background because right now the lexical parsing interacts with the UI a lot in terms of highlighting. Semantic parsing is a different story since we have the SemanticParserService that does offload that work to a worker thread.

In the work we're currently doing on SyntaxEditor for WPF (which we hope to eventually port similar concepts back to WinForms), we have taken a different approach to lexical parsing. Everything is virtualized and pulled on demand. This allows you to open huge documents instantly and so far in our alpha versions has worked out pretty well.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) 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.