Question

I just wonder what options there are to properly measure/profile/optimize ASP.net 2.0 Web Parts, especially the ones for Sharepoint 2007?

As Web Parts are a layer on another layer of technology, getting resource usage, open handles and stuff only for the web part seems to be a bit difficult.

Does anyone know some good tools or practices for profiling and optimizing web parts?

Was it helpful?

Solution

Back when we started with SP2003, we used to worry about not closing connection in apps or web parts. We used the following query to check if the base number of connections (not counting the initial spike) would increase as the app is used on the development server:

SELECT hostname, sysdatabases.name , sysprocesses.status, last_batch from sysprocesses, sysdatabases where sysprocesses.dbid = sysdatabases.dbid and nt_username = 'SP Service Account' and (hostname='WFE1' or hostname='WFE2') and sysprocesses.dbid = 10 order by last_batch desc

(replace the bolded values with those appropriate for your environment)

We haven't tried this since the upgrade to MOSS though.

OTHER TIPS

I've had success profiling SharePoint 2010 with EQATEC Profiler. Bonus is that they have a free edition. Since it worked in SharePoint 2010, I expect it will work with SharePoint 2007.

Here's how I got it working with SharePoint 2010: http://blogs.visigo.com/chriscoulson/performance-profiling-a-sharepoint-2010-project-using-eqatec-profiler/

I have found seperating out all the business logic in to a seperate DLL that is easily unit testable has been the easiest method for me. But to be honest there is really no good way that I have found, besides what I have just mentioned. The same has been true for me with Facebook applications recently. I think this is common for any application that runs inside of another platform. Especially when performance and testing where never a goal when the platform developers started to build the system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top