Friday, October 15, 2010

WSS 3.0 / Sharepoint Performance testing

 

“Why it is so slow ?”, “What is happening ?”, “Is it still working ?”

Visual Studio 2010 Premium have built in Performance testing tool “Profiler”. For most of projects it works fine, but when it comes to Workflows You cannot attach using Visual Studio to IIS worker process and debug it. You have to do it manually using command line:

VSPerfASPNetCmd.exe /s /o:profileName http://serverurl

You can find it in the filder:

%programfiles%\Microsoft Visual Studio 10.0\Team Tools\Performance Tools\

So it generates report in *.vsp file in working directory. Open it using Visual Studio 2010

This report allows to click through the Functions until You find the code line (if debug information is found) which caused the slow performance.

The bad thing I found is that time elapsed shows only in graph view. Later on You get information only about Exclusive and Inclusive samples.

I have successfully monitored page loads, events and even workflows so it is very useful tool for developers

image

WSS 3.0 / Sharepoint 2007 Multithreading

 

Today I am testing how multi threading will improve performance on different Sharepoint tasks

So the first thing to remember is, that SPSite and SPWeb are not thread safe and therefore have to create new instance of them in each Thread or there will be Sharepoint Exception

Microsoft.SharePoint.SPException: Attempted to make calls on more than one thread in single threaded mode.