Measuring bottlenecks in the library

On my website, I have a rather complex piece of business logic encapsulated in a single DLL. Since CPU usage affects the roof, when I call certain methods I need to measure and optimize.
I know about the performance profiler, but I don't know how to set it up for the library.
Moreover, I didn't seem to find any helpful resources.

How do you approach this problem?

0


a source to share


3 answers


You can create a simple exe that runs the main methods of your library. Although it does require some understanding of which method to call can help you focus on specific scenarios and check for bottlenecks.



+1


a source


You can also add some performance counters: look into msdn or open the debugger and use the old system: create a stopwatch and do a Debug.Writeline to see what is going on.



0


a source


As Dror says, run it standalone under a simple exe. I would add, run THAT under the IDE, and while it's slow, just pause it a few times and take a detailed look at what it does each time. It is controversial but very effective .

0


a source







All Articles