Topic: SerialWatcherThread() taking too much CPU time? - Performance Profiler
I've been inspecting my app for performance issues, and I was surprised when I noticed an indication that the SerialWatcherThread() is taking a considerably high CPU time in Windows. I am not sure why the profiler is pointing to the call NativeMethods.CreateAutoResetEventOrThrow(). I understand that you have a lock inside the while() loop (WinHidManager.cs line 366) , and this thread is probably blocked. So, is that perhaps an incorrect measurement from the profiler? Also, would be nice to be able to disable those threads if I am not interested on these events.
Profiler screenshot image: ibb.co/GH6xmj0