Recently there were a few times when I was using VS Code under Windows and the response time got worse and worse. A reboot would fix it temporarily, but the problem would come back. A look at task manager showed that the Shell Infrastructure Host, sihost.exe, was using a lot of CPU. I thought about killing the process, but the dire warnings about system instability deterred me the first time.
However, when it came back I did some searching. Solved: Shell Infrastructure Host Having High CPU Usage had the answers. The problem had nothing to do with VS Code, but the particular project I was working had me looking repeatedly at several JPEG images. I was opening these with the default Windows 10 Photos app. This app has a memory leak issue which can lead to high CPU usage by sihost.exe. “This leak has existed since Windows 10 and hasn’t yet been patched in Windows 11.” The article also said that it was OK to kill sihost.exe, but to really deal with the problem you need to replace Photos by a different app, mentioning in particular Irfanview.
I downloaded and installed Irfanview and that took care of everything. The Technewstoday article suggested that you might need to do some manual steps to associate the usual image file types with the new viewer app, but in fact the Irfanview installer took care of everything. I have been able to continue with the VS Code work, and Irfanview does everything Photos did for me without the problems. I am adding the installation of Irfanview to my Windows Configuration Notes.