You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2024. It is now read-only.
Fix perf issue where main event loop takes 100% of CPU (#132)
Fix perf issue where main event loop takes 100% of CPU
We have a 2 threads:
Thread #1 runs in a loop polling the response queue
Thread #2 runs in a loop decoding responses from the sqltoolsservice over stdout and posting them to the response queue
Since thread #1 doesn't sleep, it's takes 100% CPU. In addition, running python 2.7 on windows, #2 doesn’t preempt the CPU due to #1 taking all of the CPU cycles, so no response is processed.
Fix is simple – thread #1 needs to sleep so thread #2 can get scheduled and get it’s work done.
0 commit comments