I've been a user of WSL v1 since it was pre-release and they got it to a nice place. For performance, I found disabling Windows Defender entirely or on specific folders like node_modules really sped things up.
I tried WSL and have been following along with the earlier releases. Sadly, I've noticed that WSL 2 is a lot slower for certain operations. For instance, try deleting a node_modules folder using rm -rf and it takes a lot longer than WSL, noticeably.
Running Npm commands like install or Git commands is also noticeably slower. Not sure what they did to screw things up, but if you check out the issues on GitHub the slowness is widespread. Many (including myself) have gone back to WSL v1. The lack of constant FS interop seems to be the issue, but it's probably a few things causing the problems.
Thankfully, I have a MacBook Pro I do a majority of my development on with a nicer shell and better performance.
Are you sure? WSL 2 claims to be 2-5x faster for git/npm style I/O ops and up to 20 times faster for things like apt.
I noticed a huge performance boost with WSL 2.
Apt and npm was dog shit slow on WSL 1. Just doing apt update && apt dist-upgrade made me want to throw my computer out the window.
In fact, it's pretty close to native performance on Windows.
Full disclosure, I run a fast machine. Quad 4.8Ghz, 32GB Ram, NVME drives.
Are you using the older insider edition of WSL 2? Maybe try the latest mainstream release in 2004.
EDIT:
Another thing, you want to use the Linux file system for the best performance, if you are using Windows file system via WSL, you will have a penalty on I/O performance.