Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



A 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.


Uhh what? Software is probably more secure now than ever before. I don't think AV software is snake oil at all.


UEFI Secure Boot, mandatory signed binaries, and Windows Defender (XProtect on macOS), have contributed more to protecting from malware than 3rd party anti-virus. Although I think the existence, cost, and PITAness of 3rd party anti-virus might very well have contributed to motivating the OS vendors into securing their products better.


It should be noted, I believe the parent comments included Windows Defender as an anti-virus. 3rd party was never specified, and disabling Windows Defender can indeed improve file access performance.


Can confirm. I usually have to turn off windows defender whenever I'm doing anything with docker, or node modules, or something similar. If I don't, my computer slows to a crawl.


Source? I thought UEFI was just a way to make Linux a pain in the ass to dual boot with Windows? What's your evidence that it's effective against malware? I am biased here, and hate uefi.


UEFI is not the same thing as UEFI Secure Boot. UEFI booting in general makes dual-booting far easier than BIOS-based booting where operating systems have to fight over who owns the MBR. Secure Boot makes it harder to set up a multi-boot system because you need a signed bootloader for your Linux system.


Software maybe, but that has precious little to do with AV.


This sounds like anti vaxxer logic. I don’t think you remember what it was like before anti-virus.


I 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.


> 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.


Are you asking for a source for only that statement or for my post in general? Source is myself. I have a masters in Cyber Security and have worked in the field for 15 years. I've written numerous exploits and have actively evaded antivirus in the past. I can tell you from experience that ASLR is 10 times the pain in the ass that AV is, and NX bits/DEP are maybe 100 times more. Not trying to have a dick measuring contest, just justifying why I don't mind citing myself :-D

Regarding:

> Polymorphic viruses have been in commonplace since decades

I disagree. I wouldn't describe them as "commonplace" until maybe the last decade or so. Regardless, this is probably the weakest of the arguments that I made.

> AV software isn't restricted to comparing file hashes with known threats, there's so much more that can be done for security.

With this I agree, tho I would contend that even the most advanced heuristics and things like hook interceptions such as those Comodo experimented with in the late 2000s are still not what has made us so much more secure. At best AV is a small layer of a Defense in Depth strategy. At worst it's a bloated unnecessary layer that eats cycles and robs system resources that could be devoted to useful activities.

That said, if I had any Windows machines in my home (been on Linux exclusively for a bit over 10 years now), I would likely run Defender on them. I'm not suggesting that AV is worthless, just that it isn't the reason things are much more secure these days.


To give another data point, for the software I'm developing (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.


For 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.


I already use PCH, and the same project built on MSVC is even slower.


I 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.)


In a similar situation - I've had reasonable success in Linux developing a .net framework c# app in VS Code with Mono from the Ubuntu PPA. Almost everything works but for the odd project calling native Windows DLLs, so I keep windows around for manipulating VS projects and compiling these oddities. Most dev can happen in Linux though.


In my case we use a closed-source commercial UI library very extensively whose vendor has previously stated they have no interest in supporting Linux or WINE so doing C# dev on Linux is totally out of the question for me, unfortunately. The company I work for has a long-term strategic initiative to transition to an entirely web-based UI so eventually we may be able to remove the C# code but that's still years off for my group.

(In retrospect tying ourselves to a closed-source library like that was a mistake; if I could go back in time and put us on a different path (using the technologies available at the time) I would have gone with C++ and Qt instead which would have allowed for cross-platform development and deployment. Not to mention that because Qt is open-source (even if we would have had to buy a proprietary license for it at the time) we could fix any bugs we encountered ourselves, unlike our current UI library where we just need to come up with work-arounds until the vendor can get around to fixing them. But these decisions were made before I was hired so I just have to live with them.)


I 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.


It'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.


Do you take the buffercache into account? If the server has more RAM unused by processes it probably uses it as a cache, which can be 3x quicker than a SSD.


Both machines should have sufficient memory to cache the entire codebase (including all header and library files) in RAM.


Why not flip to linux and run Windows in a VM?


This helped me: 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.


Windows 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.


I wonder if their "real time protection" is making a network request every time you open a new file.


Can 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.


Thanks for the heads up (S76) but Linux runs on pretty much anything these days. This laptop is a Dell Inspiron with a 17" touch screen and lots of sensors. I'm running Arch Linux on it and everything is supported out of the box. The only tweak I have made towards hardware is changing the driver in use for the Synaptics mouse, which dmesg mentioned and will probably become the norm soon anyway.

There really is no such thing as MS native only anymore. I got Linux on here without accepting any obnoxious licenses and my laptop's price was partially subsidised by all the crap that I never even saw. To be honest, I'm not sure what the exact price breakdown really is on this thing but I do know that MS did not get in my way.

Dell are pretty Linux friendly, for example to update firmware I copy the new image to my /boot partition (EFI) and then use the built in option at boot to update the firmware - simples! No more farting around with turning swap into FAT32 for a while and a FreeDOS boot disc.


The issue is not whether Linux can be made to run, the issue is whether you are subsidizing Microsoft for that privilege.


You can buy Dell laptops these days that ship directly with Ubuntu (such as XPS and Precision), and you explicitly see the Microsoft tax fall off when making the selection. It feels so good.


Intel's NUC bricks come in two varieties: prebuilt and bring your own memory, storage and OS. The latter does not impose a Windows license fee and as long as you're running kernel 4 all the hardware is generally supported, although I see running Ubuntu combined with a thunderbolt switch doesn't work.

Sporting laptop-class processors these are not powerhouse machines and fall below the latest Mac Minis in performance. But for a development platform they can be plenty, particularly the newer models that ditch classic SATA for two NVME slots.


Not too sure what the break down on my lappy is wrt bundles. As far as I can tell I paid a fair price for it and I did not accept any licenses that I did not want. When I say fair price, I think that it is pretty decent. I don't know what a 17" Apple laptop would cost with a touch screen but probably more than the £950ish I paid for this beast.


I'll plug the Librem 13/15. I have the 13 and I'm very happy with it (initially it had a bug in the firmware so my NVMe SSD that I bought separately wasn't bootable, but they fixed it very quickly).


+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.


I 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.


They 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-t...


Sadly they are overpriced to hell.


Curious 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?


If I only messed with .NET Core I think it would be fine. I already use JetBrains Rider in place of VS.

The problem is that many systems still rely on .NET Framework which is a non start on Linux.



and their response is even worst:

https://github.com/dotnet/cli/issues/10497#issuecomment-4494...

Sadly, I thought they would have fixed it and not ignore it.


Depends on if you're just writing pure libraries, or actually doing interesting things like UI or linking to 3rd party drivers.

I think the experience with mssql is better on linux now, but I imagine anything slightly outside the box db-wise may break you.


I know SQL for linux's docker image has been a breeze to work with, even in docker for windows. Also, SQL Operations Studio (electron based) is catching up to SSMS.


It's the lack of visual studio that is often the nonstarter.


Jetbrains’ Rider IDE is now so mature that I use it as a better Visual Studio even on Windows. It also runs on Mac and Linux. Great code manipulation, navigation and refactoring tools, and great support for adjacent technologies like build and test tools for both the .net code and web front-ends.


Jetbrains’ Rider is interesting.

Can you code on linux using Jetbrains to create .NET 3.5 apps for a Windows target? 3.5 is just an example because the matching VisualStudio works more or less in wine, while I haven't tested 4.0 and more recent.


.NET Core is the way to go if you want to be cross platform

https://dotnet.microsoft.com/download?initial-os=linux


I do not "want" to be cross platform. I just want to use popular frameworks with a large adoption.

(Working well inside wine qualifies as popular for me)

I'd think 3.5 had a greater user base than .net core.


You can get by with vscode for a lot, but not everything I think.


Is 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.


Depends 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/ and use it on any platform with your editor of choice, including JetBrains Rider, which is a cross-platform .NET IDE.


Depending on your UI needs, may want to look at Eto.Forms and MonoGame. :-) That said, I agree on productivity for C# + VS. I find I'm more productive with node + npm + vs code though.

.Net Core hasn't been too bad outside VS... I do wish they'd stuck to the JSON project format. I also wish dotnet had a task runner like npm in it.


The question here is - what do you gain? You're giving up arguably one of the best developer tools available for what? A slightly different desktop skin? Remapped shortcuts? Using slightly different command line commands?


VSCode really isn't even a same type of product than Visual Studio proper and it's nowhere near a replacement for VS heavy workflows.


I get by with it okay... generally only open full on VS when I HAVE to.


I don't doubt that. But that's not the point - I'm sure plenty of people get by with Paint or Paint.NET, but noone sane would call them a replacement for Photoshop and its workflows.

Same with VS vs. VSCode - I'm happy that it works great for you, but I'm not sure why you'd think they're comparable tools.


Reasonable. .NET Core is obviously fine, but even .NET Framework stuff is largely runnable with up to date Mono, as MS is slowly pushing lots of previously 'system' libraries into NuGet. WPF is the only notable big dealbreaker.


Web stuff is fine.


> 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.


You 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.


Same. I changed to cygwin for my git workflow because WSL is just too slow.


If you had used WSLGit (https://github.com/andy-5/wslgit), you could use 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: