12 ms·
> ASP.NET initialization relies heavily on reflection Yes; the first thing I tried when .NET 7 went RTM was switch my web API over to AOT only to have it hang
by CharlieDigital 3y ago
> ASP.NET initialization relies heavily on reflection
Yes; the first thing I tried when .NET 7 went RTM was switch my web API over to AOT only to have it hang during build.
.NET 8 AOT is specifically focused on ASP.NET; they've switched over many of the reflection paths to use source generation instead. I have hopes that some time during the .NET 8 lifecycle or .NET 9 horizon, we'll see full support: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/native-aot?view=aspnetcore-8.0 https://learn.microsoft.com/en-us/aspnet/core/fundamentals/n...
> Do you use the "always allocate CPU" option?
With the CPU Boost option, the cold start is really, really good. Whether you need a warm instance is up to your own threshold for latency on cold starts. I generally avoid using "always allocate CPU" because I'm cheap.
The magic of Google Cloud and Cloud Run is really that you don't need to be always on.