Hi Actipro,
We've an issue with intermittent UI freezes when use types in a large document. As user types, every single character input is going to raise a parse request which involves some lengthy operations proportional to the size of the document.
I've tried using the AmbientParseRequestDispatcherProvider.Dispatcher for parsing in other threads. But it doesn't help. I would like to ask if it's possible to have delayed parsing mechanism. Following could be the flow:
Step 1: Delayed parse is enabled in the document
Step 2: User types a character
Step 3: CodeDocument.OnTextChanged is called, but no parse is performed to reflect its syntax highlighting.
Step 4: User types more characters
Step 5: CodeDocument.OnTextChanged is called, but no parse is performed to reflect its syntax highlighting.
Step 6: Client of the editor detects user stops typing for a while (Note: this could be in the client code)
Step7: Client requests to start a delayed parsing.
Step 8: The parse can be done either in the GUI thread or AmbientParseRequestDispatcherProvider.Dispatcher thread.
Please let me know if this is possible. This will greatly reduce our pressure on optimizing the performance.
Thanks and regards,
James Zheng