In this article I would like to take you through the usage of a Sandboxed Web Part, a Developer Dashboard and a Resource Quota.
In this article I would like to take you through the usage of:
Sandboxed SolutionA Sandboxed Solution is executed outside the IIS worker process and it is executed within the context of a site collection by a process named SPUCWorkerProcess.exe. Developer DashboardA Developer Dashboard is a debugging information framework in SharePoint. It provides the diagnostic information to troubleshoot issues with page loading and performance.Resource QuotaSandboxed Solutions are restricted to a Resource Quota. By default the Resource Quota is 300. It means the Sandboxed Solution can take up to 300 Resource Points per day.The TestFor the test, we are doing the following:
Create Sandboxed SolutionCreate a new SharePoint project.Choose the Sandboxed Solution option.Add a Visual Web PartAdd a new Visual Web Part.Include 10 second delay Open the Web Part code file and add a 10 second delay to the Page Load event.Deploy Sandboxed SolutionSave the solution and deploy.Add Web Part to PageNow edit your page and add our sandboxed web part. Save changes to the page. Note the 10 second delay involved in rendering the page due to our delay in the web part.Enable Developer DashboardTo view the page processing time, we need to enable the Developer Dashboard. Open SharePoint PowerShell and execute the following code.stsadm -o setproperty -pn developer-dashboard -pv onIf you received the successfully completed message then we are good.View Developer DashboardNow we are ready to view the Developer Dashboard. Open the home page and you can see it to the bottom of the page.Note the 10 thousand millisecond request processing time and Execution Time (due to the delay in the web part).The developer dashboard provides the following information:
A Farm Solution is required to use SPMonitoredScope.View Resource Quota UsageSince Sandboxed Solutions are assigned a quota, we can view them using the "Site Actions" > "Site Settings" page. Choose "Solutions" from the "Galleries" category.You will get the following page. Please note the current Resource Usage column.To view the 15 resource monitored in Resource Quota, please visit the link.
http://msdn.microsoft.com/en-us/library/gg615462.aspx Referenceshttp://bit.ly/16FXeAV SummaryIn this article we have explored Sandboxed Solution delay reading through the Developer Dashboard. I hope this knowledge will help you in troubleshooting real-world scenarios.
SharePoint Framework (SPFx) A Developers Guide