Posted 13 years ago
by Tobias Lingemann
-
Software Devolpment Engineer,
Vector Informatik GmbH
Hi there,
I already got a semantic syntax highlighting up and running for C#. But since I have to do that in the GUI thread, my GUI tends to freeze.
I use a timer, so the semantic syntax highlighting is only performed when the semantic parse data hasn't changed in the last 500ms and no parse job is currently running.
But never the less the fact that the GUI freezes for that time span is a problem for me.
Is there a way to speed up the performance? I guess running in a separate thread is not an option, since the token collection could have been modified by then.
I am not sure, if I can post the code here, since some parts are similar to the way you build up the strings for your Intelli-Quick-Info.
The biggest problem is the call for CSharpContext.GetContextAtOffset() which takes more than half of the cpu time.
I already got a semantic syntax highlighting up and running for C#. But since I have to do that in the GUI thread, my GUI tends to freeze.
I use a timer, so the semantic syntax highlighting is only performed when the semantic parse data hasn't changed in the last 500ms and no parse job is currently running.
But never the less the fact that the GUI freezes for that time span is a problem for me.
Is there a way to speed up the performance? I guess running in a separate thread is not an option, since the token collection could have been modified by then.
I am not sure, if I can post the code here, since some parts are similar to the way you build up the strings for your Intelli-Quick-Info.
The biggest problem is the call for CSharpContext.GetContextAtOffset() which takes more than half of the cpu time.
Best regards, Tobias Lingemann.