Skip to content

Commit cfc6896

Browse files
Correct punctuation and add text for clarity (#17640)
1 parent bf42761 commit cfc6896

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

aspnetcore/performance/performance-best-practices.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: mjrousos
44
description: Tips for increasing performance in ASP.NET Core apps and avoiding common performance problems.
55
monikerRange: '>= aspnetcore-2.1'
66
ms.author: riande
7-
ms.date: 12/05/2019
7+
ms.date: 04/06/2020
88
no-loc: [SignalR]
99
uid: performance/performance-best-practices
1010
---
@@ -95,7 +95,7 @@ Recommendations:
9595

9696
## Keep common code paths fast
9797

98-
You want all of your code to be fast, frequently called code paths are the most critical to optimize:
98+
You want all of your code to be fast. Frequently-called code paths are the most critical to optimize. These include:
9999

100100
* Middleware components in the app's request processing pipeline, especially middleware run early in the pipeline. These components have a large impact on performance.
101101
* Code that's executed for every request or multiple times per request. For example, custom logging, authorization handlers, or initialization of transient services.
@@ -231,7 +231,7 @@ ASP.NET Core 3.0 uses <xref:System.Text.Json> by default for JSON serialization.
231231

232232
The [IHttpContextAccessor.HttpContext](xref:Microsoft.AspNetCore.Http.IHttpContextAccessor.HttpContext) returns the `HttpContext` of the active request when accessed from the request thread. The `IHttpContextAccessor.HttpContext` should **not** be stored in a field or variable.
233233

234-
**Do not do this:** The following example stores the `HttpContext` in a field, and then attempts to use it later.
234+
**Do not do this:** The following example stores the `HttpContext` in a field and then attempts to use it later.
235235

236236
[!code-csharp[](performance-best-practices/samples/3.0/MyType.cs?name=snippet1)]
237237

@@ -268,7 +268,7 @@ The preceding code frequently captures a null or incorrect `HttpContext` in the
268268

269269
[!code-csharp[](performance-best-practices/samples/3.0/Controllers/AsyncBadVoidController.cs?name=snippet1)]
270270

271-
**Do this:** The following example returns a `Task` to the framework so the HTTP request doesn't complete until the action completes.
271+
**Do this:** The following example returns a `Task` to the framework, so the HTTP request doesn't complete until the action completes.
272272

273273
[!code-csharp[](performance-best-practices/samples/3.0/Controllers/AsyncSecondController.cs?name=snippet1)]
274274

0 commit comments

Comments
 (0)