VioletGiraffe / cppcheck-vs-addin

Visual Studio integration for cppcheck, an open-source static code analyzer for C++
MIT License
412 stars 85 forks source link

Occasional total freeze of VS when cppcheck is triggered #211

Closed VioletGiraffe closed 1 year ago

rubenvb commented 3 years ago

Any updates on this?

Our company is holding back on using this plugin to introduce cppcheck because this causes too much frustration with our developers. Editing 5 files and saving all of them (with cppcheck on save enabled) takes about 5 seconds during which the IDE is completely frozen. More files only extend the period VS is frozen and irresponsive. It seems like for multiple file save, the plugin processes each file sequentially, on the main thread, waiting for every cppcheck call to exit before moving on, all the while making the UI of the IDE unresponsive.

I tried debugging the plugin (your instructions worked perfectly) but as a C++ developer I cannot get my head wrapped around the async/awaits being thrown around mixed in with the VS plugin machinery behind the scenes that's calling the plugin's functions layered in a mix of native and managed code.

VioletGiraffe commented 3 years ago

Hi, I don't recall exactly what the current architecture is with regards to worker threads and async stuff, but either way it is, of course, bad design to freeze the main thread for so long. I'll look into this when I have the time (during the next couple days, hopefully). Although I believe the issue I encountered when I opened this ticket was an eternal freeze, not a temporary one.