Reputation: 7621
I have a rather 'heavy' ASP.NET page, and currently the speed is fairly unacceptable - there is a lot of database communication, and displaying large grids. But I effectively want to find out what's actually causing the most slowdown, and working from there.
Are there any tools built into Visual Studio 2008, or any third party tools, that'll allow me to do this?
Upvotes: 3
Views: 856
Reputation: 3986
There are many profiling tools available, I personally like ANTS Profiler, it is quite good. Check out the following link for more information on out to use it: ANTS Profiler
And here is a link to the ANTS Profiler download: 14 Day Free Trial
But if there is a lot of database communication, it is most likely the cause. Try minimizing the number of database calls and improving the performance of your database queries.
Also make good use of cacheing!
Upvotes: 0
Reputation: 18832
Some ideas:
Visual Studio Team System has a built in profiler. In VS 2010 this is available in premium and above.
Otherwise red-gate has a good profiler available. (for a fee).
Try using the tracing functionality built into asp.net.
Try using client side developer tools like Yslow and Page Speed or fiddler to see the requests for a page and their size and timings.
If you haven't already done so, make sure your server is serving gzipped content. This is an easy win.
Use SQL Server Profiler to profile your database requests.
Upvotes: 0
Reputation: 10940
What Muhammad said - add tracing to your code to identify the slowest bits.
Also if you think db activity could be responsible, you could run SQL profiler to identify any long running queries - this will also help you correct indexes.
Upvotes: 0
Reputation: 43531
An easy approach is using Stopwatch
. Something like this:
void SlowMethod()
{
Stopwatch timer = new Stopwatch();
timer.Start();
//a lot of DB operations
timer.Stop();
//record timer.Elapsed
//restart the timer and check another piece of code
//at last find the bottle neck of the method
}
Upvotes: 0
Reputation: 3931
Another good tool and easy to use, https://addons.mozilla.org/en-US/firefox/addon/yslow/
Not aimed directly at code, but is very helpful with resources
Upvotes: 2
Reputation: 7326
Have you heard about profiling?
My favorite tool is RedGate's Ants Performance Profiler.
Upvotes: 0
Reputation: 52241
You could use ASP.Net Trace to figure out what is slowing down in the page.
Upvotes: 2