News for hackers. Stuff that matters.
Re:Performance Improvements in .NET 7 by SideburnsOfDoom on Wednesday August 31, 2022 @10:19AM (#32662355)
> I wonder how things like ASP .NET will run with Native AOT in the future.

Let me give an example of an ASP.NET app lifecycle: an instance is launched, goes through startup code once. When it reports itself healthy, it is put into the Load balancer and then starts handling requests. Code in these paths is executed anywhere from occasionally to 1000s of times per second. After around 24 hours of this, it is shut down and restarted automatically.

So, compiler micro-optimising startup code to take ms off of it, is not interesting at all - it's only run once a day. Startup can take whole seconds, it makes little difference, the instance is ready when it's done. AOT in general isn't that important, but automatic tiered compilation based on usage data is very nice.

Re:Performance Improvements in .NET 7 by ewjt on Wednesday August 31, 2022 @10:48AM (#32662737)
Serverless.

Running an ASP.NET app in AWS Lambda is just a few lines of code. However, all of a sudden startup time becomes important for both performance and cost.

These investments by Microsoft and others[1] allow .NET to remain relevant and viable for modern use cases.

[1] https://github.com/awslabs/dotnet-nativeaot-labs

Re:Performance Improvements in .NET 7 by SideburnsOfDoom on Wednesday August 31, 2022 @10:55AM (#32662832)
Serverless is great, but if you want to go that route you should be aware that it is in no way a typical hosted ASP.NET app, and while you can "Run an ASP.NET app in AWS Lambda" with little code, there are are better ways to design a Lambda.
Re:Performance Improvements in .NET 7 by ewjt on Wednesday August 31, 2022 @02:35PM (#32666440)
Can you elaborate on “is in no way a typical hosted ASP.NET app”?

I get that the machinery under the hood is different (ie. Kestrel web server may not get used). However, we typically don’t care about those details. Our ASP.NET code runs in 3 separate places (containers, servers, Lambda) and the only difference between all 3 is a single entry point file.

Do you mean because Lambda is only serving one request at a time and has a more ephemeral host process lifetime?

Re:Performance Improvements in .NET 7 by SideburnsOfDoom on Wednesday August 31, 2022 @03:43PM (#32667321)
> Lambda is only serving one request at a time and has a more ephemeral host process lifetime

Yes, a typical hosted ASP.NET app is neither ephemeral or one request at a time. So this drives different design decisions.

Re:Performance Improvements in .NET 7 by trevorishere on Wednesday August 31, 2022 @12:30PM (#32664606)
SharePoint, as an example, can take 1+ minutes to JIT.