Editor slow for large files

SyntaxEditor for Windows Forms Forum

The latest build of this product (v24.1.0) was released 4 months ago, which was before this thread was created.
Posted 2 months ago by Urs Vogel
Version: 24.1.0
Platform: .NET 4.7
Environment: Windows 11 (64-bit)

The editor becomes very slow in typing when using XmlSyntaxLanguage or CSharpSyntaxLanguage as the Document.Languag, with documents larger than 5000 lines. In the Sample Browser though, the same file behaves fast. What properties/settings/services do I have to deactivate/consider to get the same typing experience as with the sample browser?

Comments (2)

Answer - Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA


Please make sure you followed the steps in the Getting Started documentation topic for the individual languages.  My guess would be you didn't configure the parse request dispatcher, and that means all parsing is occurring in the main UI thread instead of in worker threads.  Be sure you follow all steps in the topic and it should perform well.

Actipro Software Support

Posted 2 months ago by Urs Vogel

 That was it: Instead of using the UI-thread, AmbientParseRequestDispatcherProvider.Dispatcher = new ThreadedParseRequestDispatcher(); solved the problem.

[Modified 2 months ago]

Add Comment

Please log in to a validated account to post comments.