Once I opened this one project, CPU load went through the roof and just did not stop.

There is not much source code in the repository, but a lot of build artifacts get generated by it.

I am using VS Code now for quite a while, and especially for this one repository, and I never noticed problems, until recently.

As most of the time extensions are the cause for problems, the VS Code team even provides a kind of bisecting mechanism to help find faulty plugins.

The bisect session ended with no “winner” :-/.

Then, I learned from a tweet by Anthony Shaw that VS Code even has a process explorer!

Well, the explorer did not show any increased CPU usage - but top still showed it is caused by VS Code.

As this was only one repository, I switched to vim.

End of story… nope!

Thanks to another tweet, this time by Jens Klein, I know how to work around the problem.

It is caused by VS Code’s file watcher.

tl/dr

You need to exclude folders with many files from VS Code’s file watcher.

Go to settings, start typing files.wa... and then add the “problematic” directory, e.g. **/problematic_directory/**.

Jens tried to report the issue, but it was closed as duplicate.

Turns out, this is a known problem for five years!