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

* Update performance-best-practices.md

* Update performance-best-practices.md
pull/16426/head
Rick Anderson 2020-01-06 14:19:20 -08:00 committed by GitHub
parent 5f1687a579
commit f0fd4eff21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ A common performance problem in ASP.NET Core apps is blocking calls that could b
**Do**:
* Make [hot code paths](#understand-hot-code-paths) asynchronous.
* Call data access and long-running operations APIs asynchronously if an asynchronous API is available. Once again, do not use [Task.Run](/dotnet/api/system.threading.tasks.task.run) to make a synchronus API asynchronous.
* Call data access, I/O, and long-running operations APIs asynchronously if an asynchronous API is available. Do **not** use [Task.Run](/dotnet/api/system.threading.tasks.task.run) to make a synchronus API asynchronous.
* Make controller/Razor Page actions asynchronous. The entire call stack is asynchronous in order to benefit from [async/await](/dotnet/csharp/programming-guide/concepts/async/) patterns.
A profiler, such as [PerfView](https://github.com/Microsoft/perfview), can be used to find threads frequently added to the [Thread Pool](/windows/desktop/procthread/thread-pools). The `Microsoft-Windows-DotNETRuntime/ThreadPoolWorkerThread/Start` event indicates a thread added to the thread pool. <!-- For more information, see [async guidance docs](TBD-Link_To_Davifowl_Doc) -->
@ -60,7 +60,7 @@ Memory issues, such as the preceding, can be diagnosed by reviewing garbage coll
For more information, see [Garbage Collection and Performance](/dotnet/standard/garbage-collection/performance).
## Optimize Data Access
## Optimize data access and I/O
Interactions with a data store and other remote services are often the slowest parts of an ASP.NET Core app. Reading and writing data efficiently is critical for good performance.