dotMemory is a .NET memory profiler by JetBrains. My name is Ilya and I help develop the tool.
I'd like to tell you a classical dogfooding story of how we optimized one of dotMemory's algorithms by using our own tools – dotMemory and dotTrace. We then improved it some more using dotTrace, and finished off the optimization process by using BenchmarkDotNet.
I’d like to thank the authors of two articles, 1 and 2, which inspired me to share this story.
It all began when a colleague messaged me in Slack about a problem he was experiencing with the dominator tree in dotMemory. The data