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?
a source to share
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.
a source to share
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 .
a source to share