Live data from Hacker News

Performance Improvements in .NET 6

devblogs.microsoft.com

241–250 of 256 posts

Re: Performance Improvements in .NET 6

#241
post #170
post #11

Earlier quoted context omitted.

What are some of the libraries you're thinking of?

The Confluent.Kafka one, the AWS .NET SDK (though this is improving), the old MySQL one was really bad. My impression from reading the code and GitHub issues is that they're not maintained by real ".NET people" who are plugged in to all the fine details and best practices of the framework and the runtime. StackExchange.Redis is a good example of one that is independent of MS but still very high quality.

I'm the author of what you might call the "new" MySQL ADO.NET library: https://github.com/mysql-net/MySqlConnector

I agree with your impression that developers of the other library don't seem to be "plugged in to" the .NET ecosystem. As an independent developer (not affiliated with Oracle or Microsoft), I've been able to influence GitHub PRs that shape the ADO.NET API for .NET 6.0, just by showing up and contributing; I haven't seen anyone from the Oracle MySQL team participating. Meanwhile, they violate basic principles of the .NET Framework Design Guidelines that have been around for over a decade (https://docs.microsoft.com/en-us/dotnet/standard/design-guid...), which makes their library feel alien to a .NET programmer (regardless of the quality issues it might have).

Re: Performance Improvements in .NET 6

#242
post #138

Earlier quoted context omitted.

I'm not entirely sure where you get that 'feeling' from if you work on anything .NET related. If you're on the outside looking in, there's 270,000 packages listed on NuGet.org

That's progress, but it's also about the same number as maven central had in 2010.

I took the reply to mean that from the outside the sheer number of Nuget packages looks encouraging, but the situation from the inside is different. Although it reads a bit ambiguous.

dotnet ecosystem is.. I think it's coming along, but there are some quality gaps in certain areas that are odd compared to say Python or Golang. dotnet is MS baby so you would think there may be official SSH and WinRM libraries? Not so fast. There is a community SSH lib now that is looking good is has been active, but nothing from MS as far as I can tell. WinRM? I THINK the powershell project has this functionality inside it but it's nothing official that's published separately.

I'm planning on starting an OSS project using dotnet in the fall that is very system oriented so libraries like these are important to me. Also keeping an eye on asp dotnet, blazor, and etc.. Been lurking dotnet for over a decade.

Re: Performance Improvements in .NET 6

#243

Earlier quoted context omitted.

For windows what's your hello world workflow / stack. I've wanted to get into QT, but there seem to be a bunch of different flavors out there. I'm more a winforms guy then an HTML/XAML/CSS type person.

I'll be honest I don't think that doing C++ on windows is a good idea. The language needs to do a lot of file access for includes, and on NTFS those are super slow, my builds on Linux are something like 1/3 of the time on windows (building the same software with the same commit of clang 12 and lld, same computer, same SSD). But if you don't want to install a Linux partition, then just use aqt to install Qt: https://g…

> and on NTFS those are super slow

Usually it's less to do with NTFS and more to do with Windows Defender Real Time Protection, which murders build times because it synchronously scans files before letting applications open them.

You can disable on a per-folder basis, and it will change your quality of life drastically.

Re: Performance Improvements in .NET 6

#244
post #170

Earlier quoted context omitted.

The Confluent.Kafka one, the AWS .NET SDK (though this is improving), the old MySQL one was really bad. My impression from reading the code and GitHub issues is that they're not maintained by real ".NET people" who are plugged in to all the fine details and best practices of the framework and the runtime. StackExchange.Redis is a good example of one that is independent of MS but still very high quality.

I'm the author of what you might call the "new" MySQL ADO.NET library: https://github.com/mysql-net/MySqlConnector I agree with your impression that developers of the other library don't seem to be "plugged in to" the .NET ecosystem. As an independent developer (not affiliated with Oracle or Microsoft), I've been able to influence GitHub PRs that shape the ADO.NET API for .NET 6.0, just by showing up and contributing…

Yeh I should have mentioned MySqlConnector as another example of a high quality .NET library, my apologies.

We ripped out the Oracle MySQL library at work and put MySqlConnector in. The high quality documentation made it really easy to understand and make adjustments for the differing behaviors between the 2 libraries. Any time I've poked into the code to try to understand some fine detail of it, I've always found it very easy to quickly understand what could be going on. It's great.

Re: Performance Improvements in .NET 6

#245
post #157

Earlier quoted context omitted.

C++ builds are only bad when you use too many templates, which Chrome famously does. If you use MSVC you get some additional speedup as well because it tries to avoid disk IO. I would say Qt on Windows is probably a worse idea than just using .NET as it ties into the OS. If you need cross platform and normally use Windows it's not a bad idea.

> C++ builds are only bad when you use too many templates, if that was the case I would see the same build times when building the exact same project with the exact same compiler on Linux versus on Windows. Yet Linux is really much faster.

No, you're right, NTFS as implemented in the Windows kernel is very slow. But for most work it's decent enough if you have a properly set up build system. The issue for some large projects is the build system is not set up well.

Re: Performance Improvements in .NET 6

#246
post #59

Earlier quoted context omitted.

I like the uniformity of Java language. I like the "inner class" feature that has to be manually emulated in C#. I also like that I can implement anonymous abstract class-interface ad hoc in Java. I wish that internal visibility in C# was tied to a namespace instead of assembly, like package visibility in Java. Method co-/contravariance in C# is tied to interfaces. I prefer it tied to individual methods, like in Java…

As a counter example: As someone that worked for years in .Net and started trying to develop some projects in the Java ecosystem... what a fucking mess. Days of work to try and get projects to BUILD. Do I have to use Gradle, Maven, or something else? Which IDE to use? The IDE isn't working with whatever version of Gradle or Maven I'm using. Dependency hell. Restarting my IDE repeatedly, re-downloading dependencies, t…

I use eclipse. Never had problems with it. As for building, I figured out how to use maven to download dependencies to a separate folder and then I use eclipse features to add jars to the project. (Eclipse has maven plugin, but I couldn't get it to work. Something or else made trouble, so I gave up.) Quite pleasant setup.

> Realising that there's no standard equivalent of tasks and async

There is: Executor and CompletableFuture.

Re: Performance Improvements in .NET 6

#247
post #72
post #59

Earlier quoted context omitted.

I like the uniformity of Java language. I like the "inner class" feature that has to be manually emulated in C#. I also like that I can implement anonymous abstract class-interface ad hoc in Java. I wish that internal visibility in C# was tied to a namespace instead of assembly, like package visibility in Java. Method co-/contravariance in C# is tied to interfaces. I prefer it tied to individual methods, like in Java…

> An often-asked question is how to synchronously wait on an async method. The usual answer is "don't do it" like it solves anything. But async methods return a Task and the official examples for tasks tell you explicitly to use Wait() method to wait on a task. This is mostly the fault of the TPL documentation being written eons ago. I'd recommend David Fowler's async guidance for a modern take: https://github.com/da…

> I'd recommend David Fowler's async guidance for a modern [...] .GetAwaiter().GetResult()

Yeah, you should add to that `ConfigureAwait(false)`.

That you need a long webpage about `async` and that the official documentation on Task doesn't apply kind of drives the point home. They've botched the design of async. Yes, it works "well enough" in 95% of cases, but the remaining 5% is a mine-field.

Re: Performance Improvements in .NET 6

#248
post #59

Earlier quoted context omitted.

I like the uniformity of Java language. I like the "inner class" feature that has to be manually emulated in C#. I also like that I can implement anonymous abstract class-interface ad hoc in Java. I wish that internal visibility in C# was tied to a namespace instead of assembly, like package visibility in Java. Method co-/contravariance in C# is tied to interfaces. I prefer it tied to individual methods, like in Java…

>In C# it can be overloaded. I know it only confirms your point, but Rider highlights the overloaded operators so you spot them right away. After working with dotnet for pretty long time and coming to Java world (mostly Spring with Kotlin), I was extremely disappointed to find there's no real alternative to LINQ. What's your solution to this common problem: you have a table (HTML table) with 30 different filters, you…

Don't get me started on EF/EFCore. Using it in a large project is _the_ technical decision I regret the most. As for Java, I wrote a mini-ORM in a week. No big deal. And then I can use SQL as it was intended. EFCore dumbs down the database to being a stupid object store.

Re: Performance Improvements in .NET 6

#249
post #83
post #59

Earlier quoted context omitted.

I like the uniformity of Java language. I like the "inner class" feature that has to be manually emulated in C#. I also like that I can implement anonymous abstract class-interface ad hoc in Java. I wish that internal visibility in C# was tied to a namespace instead of assembly, like package visibility in Java. Method co-/contravariance in C# is tied to interfaces. I prefer it tied to individual methods, like in Java…

> (...) What they did with streams kind of signals that they want to deprecate them in the long run. It's a missed innovation opportunity. Do they? They kept evolving the Stream API after Java 8 well into Java 16 (Stream::multiMap, Stream::toList, etc.), it doesn't really seem to me like this is true.

"them" refers to checked exceptions.

Re: Performance Improvements in .NET 6

#250

The problem with .NET Core is that while the runtime is truly multiplatform, the development experience is not. The performance improvements on each release are trully impressive, but I think at this point the focus should go towards a better development experience. Developing on VS Code is such a hurdle thanks to the Omnisharp language server that constantly crashes, and the project does not seems to be among MS top…

You don't have to restart the IDE. Usually you can just tell Omnisharp to reanalyze your solution and wait a few seconds for that to complete. If Omnisharp has actually crashed, this will start up a new instance, too. It would definitely be nice if more resources were put towards making Omnisharp smarter and more stable, especially as it seems to be the premier implementation of an LSP server.

Even that does take a huge amount of time in our solution which is around 300kloc
Post reply on HN