microsoft / microsoft/vscode-remote-release
[Remote-Container Bug] Massive UI performance issues without x11 socket when using Containers in WSL2
@chrmarti is already working on this.
Since Jun 28, 2024.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
We use Dev-Containers from inside WSL2 and need graphical applications like Cypress. When we just run our container without special mounts, Cypress gets extremely slow and uses a lot of CPU. When we also add a mount for /tmp/.X11-unix into the container, it gets massively faster.
This can also easily be verified by using glxgears from mesa-utils. Without the mount, I get 100 FPS, with the mount 1100 FPS, so more than a 10x increase.
- VSCode Version: 1.90.2
- Local OS Version: Windows 10
- Remote OS Version: WSL2 Debian
- Remote Extension/Connection Type: Container over WSL
Steps to Reproduce:
- Create a
devcontainer.jsonfile like:
{
"name": "x11-socket-perf-test",
"build": {
"dockerfile": "Dockerfile",
},
"runArgs": [
"-e", "DISPLAY=${localEnv:DISPLAY}",
"-v", "/tmp/.X11-unix:/tmp/.X11-unix:ro"
]
}
- Create a simple
Dockerfilethe following content:
FROM debian
RUN apt-get update && apt-get install -y mesa-utils
- Start the dev-container and run
glxgears. Every 5 seconds you see an FPS in the console. - Close the container and remove the
runArgsfromdevcontainer.jsonand rebuild the container. - Start
glxgearsagain and you will see that it is a lot slower.
Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes
Additional info:
When I inspect the container created without my manual mount of the x11-socket, I only see a mount from /run/user/1000/wayland-0 (beside vscode/_data and the workspace).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.