From the course: C#: String Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Use Perf Monitor to examine performance improvements - C# Tutorial
From the course: C#: String Essential Training
Use Perf Monitor to examine performance improvements
- [Instructor] It's time to examine how StringBuilder improves performance. We'll see what impact massive string concatenation has on memory and how often it triggers the garbage collection process. We need to perform several steps to get ready. First is to go to your Release mode, switch from Debug to Release. This ensures that we get a truer understanding of what happens in the release version of the application. Then to run the application, you want to run it without the debugger attached. So go to Debug, Start Without Debugging. Then I will hold down the Window key, then right arrow to dock to the right side of the screen. Next step is to run Perf Monitor. I'll dock that to the other side of the window. And then choose Performance Monitor and it starts with one default monitor. I want to remove that, so I'll right click down here and choose Remove all Counters. And then I'll click on the plus symbol to add back…
Contents
-
-
-
-
-
-
(Locked)
Combine strings with String.Concat3m 23s
-
(Locked)
Combine strings with the concatenation operator2m 27s
-
(Locked)
Composite formatting with placeholders4m 50s
-
(Locked)
Use C# interpolation for simpler composite formatting2m 24s
-
(Locked)
Use StringBuilder to improve performance4m 15s
-
(Locked)
Use Perf Monitor to examine performance improvements2m 53s
-
(Locked)
-
-
-
-
-
-
-