From a414ce2b4cd9f04e2b4f79dbb5756aa97f71ec37 Mon Sep 17 00:00:00 2001 From: Weihan Li Date: Thu, 14 Sep 2023 17:54:33 +0800 Subject: [PATCH] Update best-practices large objects threshold (#30351) --- aspnetcore/fundamentals/best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/fundamentals/best-practices.md b/aspnetcore/fundamentals/best-practices.md index 0150eb9d7e..14b04d9905 100644 --- a/aspnetcore/fundamentals/best-practices.md +++ b/aspnetcore/fundamentals/best-practices.md @@ -62,7 +62,7 @@ Beginning with ASP.NET Core 3.0, `IAsyncEnumerable` can be used as an alterna ## Minimize large object allocations -The [.NET Core garbage collector](/dotnet/standard/garbage-collection/) manages allocation and release of memory automatically in ASP.NET Core apps. Automatic garbage collection generally means that developers don't need to worry about how or when memory is freed. However, cleaning up unreferenced objects takes CPU time, so developers should minimize allocating objects in [hot code paths](#understand-hot-code-paths). Garbage collection is especially expensive on large objects (> 85 K bytes). Large objects are stored on the [large object heap](/dotnet/standard/garbage-collection/large-object-heap) and require a full (generation 2) garbage collection to clean up. Unlike generation 0 and generation 1 collections, a generation 2 collection requires a temporary suspension of app execution. Frequent allocation and de-allocation of large objects can cause inconsistent performance. +The [.NET Core garbage collector](/dotnet/standard/garbage-collection/) manages allocation and release of memory automatically in ASP.NET Core apps. Automatic garbage collection generally means that developers don't need to worry about how or when memory is freed. However, cleaning up unreferenced objects takes CPU time, so developers should minimize allocating objects in [hot code paths](#understand-hot-code-paths). Garbage collection is especially expensive on large objects (>= 85,000 bytes). Large objects are stored on the [large object heap](/dotnet/standard/garbage-collection/large-object-heap) and require a full (generation 2) garbage collection to clean up. Unlike generation 0 and generation 1 collections, a generation 2 collection requires a temporary suspension of app execution. Frequent allocation and de-allocation of large objects can cause inconsistent performance. Recommendations: