WSL performance issues while working on the codebase

Hello there,

I have been using WSL about as long as I have been contributing to the codebase, and it has been mostly smooth sailing.

I have had my share of issues with missing tools, low memory, network issues (Windows’ 127.0.0.1 vs Nodejs on Ubuntu’s localhost not resolving), and permission errors but many of these have been ironed out with the latest WSL versions.

I wrote a bit about my setup here: Introduction - Open Source Contributor

Two main getaways I have learnt (not necessarily WSL specific):

  1. 8GB is not enough for freeCodeCamp/freeCodeCamp (last I checked, WSL defaults to half of what you have, or 8GB - whichever is smaller)
  2. Many errors can be simply solved by installing a missing tool. Whether that be build-essentials or Microsoft Visual Studio 2019…

For your specific case, I would actually recommend:

  • Updating to Windows 11
    • It is not that different to Windows 10, but comes built in with useful WSL/development tools (e.g. Xvfb, ability to run GUIs in/through WSL)
  • Set your wsl memory to 12GB
  • NOT run pnpm run test
    • I hardly ever do this, and usually it is not what you need to do. Usually, you just want to test something specific to either the curriculum or the client or the api - almost never all 3.

Hope this helps

2 Likes