Update performance-best-practices.md (#10263)

pull/10276/head
Rick Anderson 2019-01-08 08:18:13 -10:00 committed by GitHub
parent 552b76ec38
commit 95395468aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,7 @@ author: mjrousos
description: Tips for increasing performance in ASP.NET Core apps and avoiding common performance problems.
monikerRange: '>= aspnetcore-1.1'
ms.author: riande
ms.date: 11/29/2018
ms.date: 1/9/2019
uid: performance/performance-best-practices
---
# ASP.NET Core Performance Best Practices
@ -14,7 +14,6 @@ By [Mike Rousos](https://github.com/mjrousos)
This topic provides guidelines for performance best practices with ASP.NET Core.
<a name="hot"></a>
<!-- TODO review hot code paths is jargon that won't MT (machine translate) and is not well defined for native speakers. -->
In this document, a hot code path is defined as a code path that is frequently called and where much of the execution time occurs. Hot code paths typically limit app scale-out and performance.
## Cache aggressively
@ -126,6 +125,10 @@ Recommendations:
* **Do** use ASP.NET Core's [built-in support](xref:client-side/bundling-and-minification) for bundling and minifying client assets.
* **Do** consider other third-party tools like [Gulp](uid:client-side/bundling-and-minification#consume-bundleconfigjson-from-gulp) or [Webpack](https://webpack.js.org/) for more complex client asset management.
## Compress responses
Reducing the size of the response usually increases the responsiveness of an app, often dramatically. One way to reduce payload sizes is to compress an app's responses. For more information, see [Response compression](xref:performance/response-compression).
## Use the latest ASP.NET Core release
Each new release of ASP.NET includes performance improvements. Optimizations in .NET Core and ASP.NET Core mean that newer versions will outperform older versions. For example, .NET Core 2.1 added support for compiled regular expressions and benefitted from [`Span<T>`](https://msdn.microsoft.com/magazine/mt814808.aspx). ASP.NET Core 2.2 added support for HTTP/2. If performance is a priority, consider upgrading to the most current version of ASP.NET Core.
@ -143,4 +146,4 @@ Recommendations:
* **Do** include logic in the app to detect and handle conditions that would cause an exception.
* **Do** throw or catch exceptions for unusual or unexpected conditions.
App diagnostic tools (like Application Insights) can help to identify common exceptions in an application which may affect performance.
App diagnostic tools (like Application Insights) can help to identify common exceptions in an application which may affect performance.