2

I'm exploring remote container development in VS Code and GitHub Codespaces.

For context, I'm working in Windows 11 on performant Dell XPS 9310 i7 / 32 GB RAM machine.

When I open my Codespace / Dev Container in GitHub Codespaces via the browser, or in VS Code via the > Codespaces: Open in VS Code command, there are no performance issues.

Because I want to know whether development offline is feasible, I am testing having cloned my repo on my local machine, and having opened the repository folder in VS Code locally. This causes a local Docker container to be started in Docker Desktop running on WSL 2. (As expected, Git commands need to be managed outside of VS Code as expected due to permissions, but otherwise looks OK).

A performance issue is apparent when interacting with the terminal (bash or zsh). A terminal prompt takes literal minutes to appear, and to return after every command. I am often stuck waiting for a prompt as shown below after running simple commands requiring few resources.

Waiting for bash prompt

What is the cause of the poor performance here?

gbro3n
  • 6,729
  • 9
  • 59
  • 100
  • If you open the folder locally, it should not open devcontainer in vscode. If you need to open devcontainer in vscode, you need a devcontainer.json. Do you have a devcontainer.json? – ikhvjs Jun 12 '22 at 09:46
  • Yes I have a devcontainer.json. To be clear, it works and runs in the container, the issue here is performance. – gbro3n Jun 13 '22 at 08:25
  • 1
    Does this [doc](https://code.visualstudio.com/remote/advancedcontainers/improve-performance) help? It looks like the network issue between the container and your windows instance. Did you place your codes in the wls2 linux instance instead of the windows instance. – ikhvjs Jun 13 '22 at 09:23
  • I've come across this issue before, I should have realised! You're right, I have checked out the code outside of the WSL2 instance. I will check later and confirm back. – gbro3n Jun 13 '22 at 10:14
  • Confirmed, checking out under WSL2 location has resolved the issue – gbro3n Jun 13 '22 at 20:37
  • Good to hear. You may leave a answer for yourself to help people finding the answer in the future – ikhvjs Jun 14 '22 at 06:35

0 Answers0