Optimizing application performance and memory traffic with dotTrace
In this section, we are going to continue tracing our CH05_BatchFileProcessing
project. We have fixed the UI freeze and will be running another trace to see whether we can identify any further issues. When analyzing the trace, we will see that a lot of memory traffic is being generated that is affecting the performance of our application. So, we will address this issue and fix it:
- Open dotTrace. Your previous session should be saved. Select it, and click on the Run button to start tracing. The sample application will then be started.
- Select the text files, and click on the Process Files button.
- Once the files have been processed, kill the application. This will flush the data and load our trace in the trace viewer. Then, close dotTrace.
- Once the trace snapshot has been loaded into Timeline Viewer, click on the button to Show Snapshot.
- In the Filters view, select Events | .NET Memory Allocations...