I'm trying to trace through a large .net website to find out what's taking 4 to 5 seconds to load. Normally I just put:
trace="true"
in the aspx page declaration and I'm able to somewhat narrow it down from there.
But the problem I have is that I need it to be more narrow of what's taking so long. Right now I'm only getting that between Begin PreRender and End PreRender it takes 5 seconds.
Before I start stepping through every line and writing tracing statements throughout this code, is there a simple way and an easy to use tool to get a very detailed log of one page's entire execution? It's only for my localhost, not production,开发者_开发百科 and the more detail the better. I don't care if the log file is 50MB when its done, I'd just want to see what exact function is taking so long.
You can profile the code using the ANTS Performance Profiler.
They have a free 14 day trial on their website.
If you own the premium or ultimate edition of Visual Studio 2010, you can use the integrated profiler which can show you the methods where your program spends the most time in.
There are many .NET profilers from 3rd party vendors on the market, for example Jetbrains dotTrace.
I've used Eqatec and it has a free version.
You want visibility into why it's taking time. Tracing and measuring tools are a common way, but there's another.
The method I rely on is this. It sounds crude, but it's not. Here's a simple explanation.
If you want the statistical argument, look here.
精彩评论