Describe the bug
Whenever I'm working with yarn workspaces I get very high CPU usage. Even after closing all yarn commands, VSCode, etc. I've tried multiple restarts but it keeps happening. Could this be to do with pnpify?
To Reproduce
Unsure - appears to be whenever working with workspaces. Last came up while testing an empty repo the following issue: https://github.com/yarnpkg/berry/issues/839
Screenshots
CPU is the number after ?


Environment if relevant (please complete the following information):
I actually had a similar issue on Windows when I was playing with this back in December. On a few occasions closing VSCode wasn't enough. I remember zombie node processes that continued to run.
It seemed to happen consistently when I was editing a package.json and would hit ctrl+space to for the version number lookup like this. When I opened VSCode's process explorer I noticed a ton of CMD executions of NPM.

I had done some weird stuff to get prettier working so I have a feeling this is related to #822
@joshmeads @sparebytes Have you tried to regenerate sdk? E.g.:
yarn pnpify --sdk
The yarn v2 does not use in memory node_modules fs (which might be CPU bound) for TypeScript support in the latest editor SDK:
https://github.com/yarnpkg/berry/blob/b0c9d687a783f72161f78a2b4e4b1a516c283171/packages/yarnpkg-pnpify/sources/generateSdk.ts#L11
But if you generated SDK with older pnpify version you will have imports of @yarnpkg/pnpify inside .vscode/pnpify/typescript/lib/tsserver.js which will result in building in-memory node_modules fs and might hit CPU hard (at the moment, I'm working to reduce CPU usage for in-memory node_modules fs).
I've also seen this exact same problem. I can confirm that it disappeared after moving back to yarn v1.
Not sure who's fault it is, probably VSCode, but the same npm view commands were hanging
This was fixed in https://github.com/yarnpkg/berry/pull/800.
Try updating and running yarn pnpify --sdk again