4 ms·
Would you recommend WSL 2? I updated it and regretted it immediately due to a bug where accessing the Windows filesystem through the ubtuntu shell is something
by khalilravanna 7y ago
Would you recommend WSL 2? I updated it and regretted it immediately due to a bug where accessing the Windows filesystem through the ubtuntu shell is something like 10-100x slower. Running ‘git status’ takes > 10 seconds to return. Do you stick exclusively to the Linux filesystem?
- Gene_Parmesan 7y agoI really enjoy WSL 2. I mostly use it on my ThinkPad; my workplace is mostly .NET + Angular, so I kind of need Windows as my primary OS, but I'm personally more used to dev work via Linux. (There are coworkers who get away with using Macbooks but some of the tooling we use is difficult for them to run.) I dual boot at home, but for work dual book isn't really the tool I need. What I want is to be able to use bash and the *nix tools I know best as an interface to the Windows-based projects I work on. I'm much faster navigating the FS, even the Windows FS, using bash commands than the nightmare that is cmd, and Powershell just feels like too much -- like Java in the shell. So WSL has been exactly what I need. Working on projects within the Windows directories does feel slower, but I haven't noticed anything like 100x slowdowns. NPM installs are essentially the only part of my regular workflow that feels painful. Also it lets me work on my pet roguelike project during slow meetings, but that's our little secret....
- tuananh 7y agoit's still not fixed yet. `npm install` would take forever.
- chrismorgan 7y agoLinux accessing Windows is indeed way slower under WSL 2, and I get the impression from what I’ve heard that this is unlikely to ever be improved much. But working the other way round is a bit faster than it used to be, if I recall correctly, and working purely within ext4 is enormously faster than under WSL 1. Combined with the steady improvements to being able to access the Linux side from Windows (under \\wsl$\machine-name), and being able to mount that to a drive letter (I have my ~/.zprofile run `/mnt/c/WINDOWS/system32/subst.exe A: '\\wsl$\arch' > /dev/null`, which delays subsequent login shell startups by 30–40ms, but that’s not too bad), shifting all your relevant stuff onto the Linux side and still working with Windows tools where desirable is quite feasible. I moved all my files (including a >700MB Git repository) from C: to A: after upgrading to WSL 2. Well worth it. I do most of my work in a terminal (the Linux side) or in gVim (the Windows side).
- chx 7y ago> shifting all your relevant stuff onto the Linux side and still working with Windows tools where desirable is quite feasible. Is IntelliJ IDEA able to detect file changes like this? Maybe share from Linux via CIFS?
- chrismorgan 7y agoThe WSL filesystem is already exposed at \\wsl$\distro-name (that landed in the Windows build from 6 or 12 months ago, so you can try it now on a release channel WSL 1 distro). I doubt that’s enough for file watching (certainly things like file locking aren’t supported), and I don’t believe CIFS would allow that either. For watching file changes specifically, I imagine that you’d need a helper that could run on the Linux side and do any inotify or similar stuff there. I have no idea what IntelliJ might or might not support along these lines. I get the impression that VS Code is generally the tool with the best support, though again I have no concrete knowledge about file watching in particular.
- tilolebo 7y ago+1 I also tried WSL 1 with Ubuntu and was hugely disappointed by the speed. Even a simle agt-get install would take forever. WSL 2 improved the Linux filesystem speed A LOT. I think it's a sane approach: * keep all your dev stuff in WSL (The Visual Studio Code "Remote - WSL" plugin is amazing!) * use Windows for GUI tools only
- khalilravanna 7y agoInteresting. Is it possible to use something like Visual Studio Code (my main editor due to a lot of TypeScript focused work) with the Linux filesystem? I think I tried this and couldn't get it to work but I can't remember and maybe I did it wrong and am just incompetent.
- peschkaj 7y agoThe "Remote - WSL" extension allows you to open a folder inside WSL but keep writing code inside VS Code running as a Windows process. It's available at https://github.com/Microsoft/vscode-remote-release.git https://github.com/Microsoft/vscode-remote-release.git
- zaphirplane 7y agoWhat is annoying about WSL is the hyperv windows features it needs to be enabled cause virtualbox to not work There is an experimental feature in virtualbox that works around that but supposedly caused vb to be slow (didn’t work for me)
- mafuyu 7y agoWSL 2 is what finally made WSL usable for me. On WSL 1, build times were significantly slower for large compiles due to file i/o but WSL 2 is basically at parity with native Linux.
- running101 7y agoCheck out multipass as alternative to wsl2 https://multipass.run/ https://multipass.run/