Monday, November 28, 2011

Performance analysis using SharePoint 2010 developer dashboard

In this post I will explained, how we can improve rendering of a page in SharePoint using SharePoint 2010 developer dashboard.
Developer dashboard shows
1. Requests with timings for each item
2. Database queries and their response times
3. Load times for each web part on the page and pre-render time.
4. Number of web server SPRequest(s) and their timing.
5. Any critical events.
How to activate the developer dashboard
There are various ways to activate developer dashboard
1. Power Shell
2. Stsadm command
3. SharePoint object model
In this post, we will use stsadm command to activate developer dashboard.
Stsadm -o setproperty -pn developer-dashboard -pv “ondemand”
If the developer dashboard is set to OnDemand,then button appears in the top right corner just next to login name

When you click the small icon in the top right corner, the Developer Dashboard will be opened and displayed at the bottom of your page as shown in below screen shot

You can see that it has a Green border right now. That generally means its loading quick enough not to be a real problem. It can also render Yellow, which indicates that there's a slight delay and then it could render a Red border which would mean you definitely need to look into it immediately!
Page Request to the left-hand side
You can read out the Page Request, and see what loads and how long it takes to load. This is perfect to use to track down heavy-loading application or finding out what's taking so long to render the page;
How to disable Developer dashboard?
stsadm -o setproperty -pn developer-dashboard -pv “Off”