9 ms·
I develop on Windows 10 because I’m a .NET developer and really like the idea of WSL. But the more I use it the more frustrated I become by its file access perf
by marsrover 8y ago
I develop on Windows 10 because I’m a .NET developer and really like the idea of WSL. But the more I use it the more frustrated I become by its file access performance. I started off using it for Git but now I just use Git bash in Poweshell (which also annoys me with its slowness).
I haven’t developed on an actual *NIX machine in years but recently I deployed something to my DO VPS and it “built” (php composer) in what felt like 1/100 of the time it was taking on my computer, whether running the Windows binaries in Powershell/CMD or the Linux binaries in WSL. Although I will say WSL is slower.
In fact, it was so fast that I’m about to call Microcenter and see about picking up a Thinkpad to install Linux on.
- tyingq 8y agoThis helped me: https://github.com/Microsoft/WSL/issues/1932#issuecomment-407855346 https://github.com/Microsoft/WSL/issues/1932#issuecomment-40... Microsoft made some change a year or so ago that brought more of WSL into Windows Defender's view.
- Strom 8y agoWindows Defender is an abomination. It makes file operations on regular Windows also extremely slow. For example unpacking the Go 1.11 zip which is 8700 files takes a second with my PCIe SSD with Windows Defender disabled. Enable it and the extraction time rises to several minutes.
- tyingq 8y agoI wonder if their "real time protection" is making a network request every time you open a new file.
- Joeri 8y agoA major performance improvement is adding the working folders for my coding projects to the exclusion list of whatever antivirus solution is running. On low-specced machines I disable AV entirely, because I feel these days it is mostly snake oil anyway with zero days being commonplace.
- computerex 8y agoUhh what? Software is probably more secure now than ever before. I don't think AV software is snake oil at all.
- throwaway2048 8y agoSoftware maybe, but that has precious little to do with AV.
- JohnJamesRambo 8y agoThis sounds like anti vaxxer logic. I don’t think you remember what it was like before anti-virus.
- freedomben 8y agoI do remember, but correlation != causation. The major improvements that have made software so much more secure are not AV, they are things like ASLR, non-executable stack, stack canaries, a shift to less-privileged code and having more functions in user space, memory-safe(r) languages being more common place, and an increase in general security awareness. If anything anti-virus is much less useful now that polymorphic shell code is commonplace, as well as the fact that user error (such as falling for a phishing attack) is by far the largest cause of security failings.
- computerex 8y ago> If anything anti-virus is much less useful now that polymorphic shell code is commonplace Source? I disagree with this statement. Polymorphic viruses have been in commonplace since decades. I don't think that diminishes from the importance of AV. AV software isn't restricted to comparing file hashes with known threats, there's so much more that can be done for security.
- freedomben 8y ago
- Waterluvian 8y agoCurious just how feasible doing . NET dev in Linux would be? Is it a non start? Is it inconvenient and rough? Is it fine if you give it enough love?
- akiselev 8y agoIt's the lack of visual studio that is often the nonstarter.
- platz 8y agoYou can get by with vscode for a lot, but not everything I think.
- Waterluvian 8y agoIs this purely about convenience tools in an IDE or are there some things actually locked into the Windows environment? Is .NET a lot like Xcode where it's not like you can just download the libraries + compiler + a text editor and have all you need? The latter is broadly true for every language I've really dove into so this feels like a foreign concept. Edit: what I could stand to gain is that I work weekly in four or five languages. Already well tooled up in Ubuntu and vscode. Nothing frustrates me more than having to keep multiple IDEs consistent. Imagine driving two cars all day that have their controls in all different places.
- paavohtl 8y agoDepends on what you're doing. Some technologies are only supported on Windows (like the official UI frameworks), but most things like webdev and gamedev libraries are supported on all platforms. Giving up Visual Studio can be a hard sell, as from my experience C# + Visual Studio (+ ReSharper) is one of the most productive programming environments you can have. You can download the SDK from https://dotnet.microsoft.com/ https://dotnet.microsoft.com/ and use it on any platform with your editor of choice, including JetBrains Rider, which is a cross-platform .NET IDE.
- MrRadar 8y agoI have a similar experience. I'm a developer on a product that has both C and C# components. The C component runs on both Windows and Linux and is by far the larger of the two while the C# GUI component is Windows-only. Our main workstations are Windows but we also have a shared Linux development VM on our group's VM host. The VM host is not very powerful, it's a hand-me-down machine from another group that's around 7 years old at this point, with a low-clocked Bulldozer-based AMD Opteron CPU and spinning rust storage. In comparison my workstation has a 4th-gen Core i7 processor and a SATA SSD. Despite the fact that my workstation should be around 2-3x as fast per thread and have massively better disk I/O the VM host still builds our C code in less than half the time. If I didn't have to maintain the C# code and use MS Office I'd switch to Linux as my main workstation OS in a heartbeat. (Note that the compilation process on neither platform uses parallel compilation so it's not that our VM is farming the compile out to more cores.)
- splittingTimes 8y agoI am not a C# dev, so please bear with me. So you have you core business logic and algorithms written in C and only the front end/GUI uses C#? Can you cleanly separate the two (via MVVC or a variation thereof)? Does the whole application runs on C# and you have RPCs between the two? What does that mean for performance? Cheers and thanks for any Insights about your setup.
- MrRadar 8y agoIt's a pretty classic client/server setup (not too different from modern web apps, actually). The C code is the server and the C# code (which is actually a plugin to another application written in C#) is the client. The C server can run independently of the C# clients but isn't very useful (to our customers at least) by itself. Most of the C# code's responsibility is taking user commands from the plugin's host application and converting them to messages sent to the C server for further processing, which isn't very speed/latency sensitive most of the time since it only has to operate at user-perceivable timescales and on small amounts of data. The remainder of the C# code is some custom UI controls and dialogs. The network communications (if you squint hard enough) somewhat resembles REST with custom binary protocols instead of HTTP and JSON; if REST were in style when this code was first written (around 10 years ago) it almost certainly would have been used for the network/message layer instead.
- chrisper 8y agoSame. I changed to cygwin for my git workflow because WSL is just too slow.
- suzuki 8y agoIf you had used WSLGit (https://github.com/andy-5/wslgit https://github.com/andy-5/wslgit), you could use Cyg-Git (https://github.com/nukata/cyg-git https://github.com/nukata/cyg-git) instead. It provides a "Git for Windows" virtually for Go and VSCode. You only need Cygwin and its packages, including Cygwin's git.
- jcelerier 8y agoTo give another data point, for the software I'm developing (https://ossia.io/ https://ossia.io/, a few hundred thousand LOC of modern C++ / Qt), a full build, with the same compiler version (clang-7), on the same machine, on the same pci-express NVMe disk takes 2 to 3 times slower on windows than on linux. every time I have to build on windows I feel sad for all the developers forced to use this wretched environment.
- Const-me 8y agoFor C++, on Windows I use MSVC compiler, and I'm usually happy with its performance. If your clang supports precompiled headers, try enabling them. This saves CPU time parsing standard headers, but also saves lots of IO accessing these random small include files, replacing the IO with large sequential read from the .pch.
- jcelerier 8y agoI already use PCH, and the same project built on MSVC is even slower.
- mehrdadn 8y ago> I started off using it for Git but now I just use Git bash in Poweshell (which also annoys me with its slowness). This may not be a WSL issue. You don't want to mix Windows git (what you're calling git-bash) with Linux git (or MSYS2 git). Even a git status will cause them to trample on each other in ways I don't yet fully understand, and that will also slow them down very significantly as one tries to process a repo the other one has previously accessed. Pick one and stick with it for any given repo.
- tracker1 8y agoYou may actually see better performance via docker or vm for linux under windows. Also, if you're using or can migrate to .Net core it works pretty well there. I'm using containers for local services I'm not actively working on, even though the application is being deployed to windows, because it's been easier for me. I'd actually prefer Linux host at work, but there's legacy crap I need. I do work remotely sometimes on my home hackintosh though.
- sethrin 8y agoCan I plug System76 as an alternative? I feel like it's important to purchase Linux-native hardware. Microsoft has largely prevented competition in this market, and I think more viable options would benefit consumers. Also, S76 has pretty good hardware.
- samstave 8y ago+1 for S76 HW guts, but I find their laptop chassis to have been really flimsy in the past - where screws fell out and into the case of 3 laptops. They were, in the past, using CLEO as an OEM.... They came out with that custom steel and wood case all made in the USA recently, but don't know if they are building their own laptop HW these days.
- jchw 8y agoThey are going to be building laptops. Not sure if they have sold any of the ones developed in house, but here's the related press release. https://blog.system76.com/post/159767214983/entering-phase-three https://blog.system76.com/post/159767214983/entering-phase-t...
- sethrin 8y agoI got a Galago Pro recently, because my previous netbook fell apart. The construction on the Galago Pro is quite solid, I believe; getting it apart was a bit more challenging than I am used to. However, the laptop is still being manufactured by CLEVO, and as one consequence of this, the battery life is pretty limited (I was aware of this drawback before purchase). I believe that, as the sibling poster mentions, they are bringing their design and manufacture in-house, and that subsequent revisions will be an improvement. I don't find the issue to be hugely limiting, and I am personally willing to forgive quite a lot to have (1) no Windows key, and (2) non-soldered RAM.
- computerex 8y agoSadly they are overpriced to hell.
- gerdesj 8y ago