VitalElement / VEStudio

0 stars 0 forks source link

Optimize RunDiagnostics method / Add seperate dispatcher for clang calls. #42

Closed danwalmsley closed 9 years ago

danwalmsley commented 9 years ago

Far too much time is taken up on the ui thread! This could be fixed by copying thread sensitive data quickly before, then processing. At the moment ui thread is held up processing the C / C++ code.

Also a different dispatcher needs to be used for clang calls, the ui thread can not be held responsible for this either. This will greatly improve performance of code completion, syntax highlighting, etc.

An IDispatcher interface may need to be created to allow methods that are not in wpf dlls, i.e. Models to dispatch up to the application level.

danwalmsley commented 9 years ago

Added a second dispatching queue.

danwalmsley commented 9 years ago

Run diagnostics is now run on the new Worker dispatcher, attention was made to thread safety, so a list of open documents is copied before running, this ensures someone closing a document doesn't cause the task to fail.

Response time was lowered an edit / ui remains responsive during code analysis. Closing issue, will watch for any introduced issues.