Skip to content

Commit fc7be67

Browse files
committed
Update case study on isolating a performance issue
1 parent a99d272 commit fc7be67

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

docs/profiling/isolate-performance-issue.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Isolate a performance issue"
33
description: "Learn how to use .NET Counters and the Instrumentation tools to identify, isolate, and resolve performance issues."
4-
ms.date: 3/26/2025
4+
ms.date: 7/3/2025
55
ms.topic: conceptual
66
dev_langs:
77
- "CSharp"
@@ -18,52 +18,49 @@ monikerRange: '>= vs-2022'
1818

1919
# Case study: Isolate a performance issue (C#, Visual Basic, F#)
2020

21-
Use the profiling tools to investigate performance issues and isolate problem areas. This case study uses a sample application with performance issues to demonstrate how to use profiling tools to improve efficiency. If you want to compare profiling tools, see [Which tool should I choose?](../profiling/choose-performance-tool.md)
21+
This case study demonstrates how to use Visual Studio profiling tools to identify and resolve performance issues in a sample ASP.NET application. For a comparison of profiling tools, see [Which tool should I choose?](../profiling/choose-performance-tool.md)
2222

23-
This case study covers these topics:
23+
You'll learn:
2424

2525
- How to use Visual Studio profiling tools to analyze application performance.
26-
- How to interpret the data provided by these tools to identify performance bottlenecks.
27-
- How to apply practical strategies to optimize code, focusing on .NET Counters, call counts, and timing data.
26+
- How to interpret profiling data to find bottlenecks.
27+
- Practical strategies for optimizing code using .NET Counters, call counts, and timing data.
2828

29-
Follow along and then apply these techniques to your own applications to make them more efficient and cost-effective.
29+
Apply these techniques to improve your own applications.
3030

3131
## Isolate a performance issue case study
3232

33-
The sample application in this case study is an ASP.NET app that runs queries against a simulated database. The example is based on the [Diagnostics Sample](/dotnet/core/diagnostics/debug-threadpool-starvation).
33+
The sample ASP.NET app runs queries against a simulated database and is based on the [Diagnostics Sample](/dotnet/core/diagnostics/debug-threadpool-starvation).
3434

35-
The primary performance issue with the sample application lies in inefficient coding patterns. The application has a performance bottleneck that significantly impacts its efficiency. The problem includes the following symptoms:
35+
Key performance symptoms:
3636

37-
- **Low CPU Usage**: The application shows low CPU usage, indicating that the CPU is not the bottleneck.
37+
- **Low CPU Usage**: The CPU is not the bottleneck.
38+
- **High ThreadPool Thread Count**: Thread count rises steadily, indicating thread pool starvation.
39+
- **Slow Application Response**: The app responds slowly due to a lack of available threads.
3840

39-
- **High ThreadPool Thread Count**: The thread count is relatively high and steadily rising, suggesting thread pool starvation.
40-
41-
- **Slow Application Response**: The application responds slowly due to the lack of available threads to process new work items.
42-
43-
The case study aims to address these issues by employing Visual Studio's profiling tools to analyze the application's performance. By understanding where and how the application's performance can be improved, developers can implement optimizations to make code faster and more efficient. The ultimate goal is to enhance the application's overall performance, making it more efficient and cost-effective to run.
41+
This case study uses Visual Studio profiling tools to pinpoint and address these issues, helping you make your code faster and more efficient.
4442

4543
## Challenge
4644

47-
Addressing the performance issues in the sample .NET application presents several challenges. These challenges stem from the complexity of diagnosing performance bottlenecks. The key challenges in fixing the problems described are as follows:
48-
49-
- **Diagnosing Performance Bottlenecks**: One of the primary challenges is accurately identifying the root causes of the performance issues. Low CPU usage combined with slow performance can have multiple contributing factors. Developers must use profiling tools effectively to diagnose these issues, which requires some understanding of how these tools work and how to interpret their output.
45+
Fixing these issues involves several challenges:
5046

51-
- **Knowledge and Resource Constraints**: Teams may face constraints related to knowledge, expertise, and resources. Profiling and optimizing an application requires specific skills and experience, and not all teams may have immediate access to these resources.
47+
- **Diagnosing Bottlenecks**: Low CPU usage with slow performance can have multiple causes. Effective use of profiling tools and interpreting their output is essential.
48+
- **Knowledge and Resource Constraints**: Profiling and optimization require specific skills and experience, which may not always be available.
5249

53-
Addressing these challenges requires a strategic approach that combines effective use of profiling tools, technical knowledge, and careful planning and testing. The case study aims to guide developers through this process, providing strategies and insights to overcome these challenges and improve the application's performance.
50+
A strategic approach combining profiling tools, technical knowledge, and careful testing is key to overcoming these challenges.
5451

5552
## Strategy
5653

5754
Here is a high-level view of the approach in this case study:
5855

59-
- We start the investigation by watching .NET counter metrics while collecting performance data. Like the CPU Usage tool, Visual Studio's [.NET Counters](../profiling/dotnet-counters-tool.md) tool is also a good starting point for a performance investigation.
60-
- Next, for additional insights to help isolate issues or improve the performance, consider collecting a trace using one of the other profiling tools. For example, take a look at call counts and timing data using the [Instrumentation](../profiling/instrumentation.md) tool.
56+
- Start by monitoring .NET counter metrics while collecting performance data. Visual Studio's [.NET Counters](../profiling/dotnet-counters-tool.md) tool is a good starting point.
57+
- For deeper insights, collect traces with additional profiling tools, such as the [Instrumentation](../profiling/instrumentation.md) tool for call counts and timing data.
6158

6259
Data collection requires the following tasks:
6360

64-
- Setting the app to a Release build.
65-
- Select the .NET Counters tool from the Performance Profiler (**Alt+F2**). (Later steps involve the Instrumentation tool.)
66-
- From the Performance Profiler, start the app and collect a trace.
61+
- Set the app to Release build.
62+
- Select the .NET Counters tool in Performance Profiler (**Alt+F2**).
63+
- Start the app and collect a trace.
6764

6865
## Check performance counters
6966

docs/profiling/optimize-code-using-profiling-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Beginner's guide to optimizing code"
33
description: "Learn how to optimize code and reduce compute costs using Visual Studio profiling tools such as the CPU Usage tool, the .NET Object Allocation tool, and the Database tool."
4-
ms.date: 3/26/2025
4+
ms.date: 7/3/2025
55
ms.topic: conceptual
66
ms.custom: "profiling-seo"
77
dev_langs:

0 commit comments

Comments
 (0)