SharePoint quite often performs slow because of the fact that every bit of information served by SharePoint is saved in a database including images, documents, list data, dynamic pages, e.t.c.

There are different ways of improving performance some of which are mentioned on Chris O’Brien’s blog. We know that SharePoint is a ASP.NET application and there are many established techniques for improving performance of a ASP.NET website or any website in general, that can be applied to SharePoint as well.

The ones I’m going to talk about are those which do not require any programming.

  • Minify and combine Javascript and CSS
    This reduces the no. of request a browser makes for retrieving and rendering a page. When we combine multiple javascript files and minify the final file, we’re effectively reducing ‘N’ no. of requests to one and the downloaded payload is also smaller in size. Add client side  caching to this and same client won’t even request the same set of javascript files on any subsequent pages.

    NCachePoint and Aptimize provide this in their SharePoint performance accelerator products.

  • CSS Sprites (Combine Images)
    Combine images into a single image and use CSS sprite technique to render different portions of that image on the page. This also helps in reducing the no. of trips a browser makes to the server. This technique can also take advantage of client side caching.

    NCachePoint and Aptimize provide this in their SharePoint performance accelerator products.

  • Session Caching
    Saving sessions in database allows you to share the session among multiple servers in your farm but the database becomes the bottle neck for the SharePoint farm. To get around this you can save your sessions in a distributed cache which can allow you to get rid of sticky routing and still not be dependent on a single machine to serve the sessions.

    NCachePoint allows you to cache your sessions in a distributed cache that comes free with it.

  • List Caching
    SharePoint makes heavy use of list data which is stored in database. Database is optimized to store relational data then why is the performance of lists not optimal?
    In SharePoint all  list data is stored in a single table called AllUserData. This table has a long list of columns  that can save every perceivable type of data in each column of a list entry.

    Since a user can  define any type of list with any no. of columns of any type, querying this table becomes difficult and hence quite inefficient.

    One way to get around this is to cache the output of lists and serve the cached output each time list is retrieved.

    NCachePoint provides the list caching feature.

  • ViewState Caching
    With so many web parts loaded on a single SharePoint page, we get many ASP.NET controls loaded at the same time all of which have to save some state that needs to be preserved across postbacks. Typically viewstate is saved in the page that is rendered to the browser and it goes back and forth between post backs (User clicks and interaction with the controls).

    You can use a 3rd party solution to cache view state in a distributed cache and
    prevent this payload from traveling between the server and client for effectively reducing the request size and quicker response time.

    NCachePoint provides viewstate caching for SharePoint

  • Externalize the BLOBs to RBS or EBS
    All documents that are uploaded in SharePoint, are saved in database as BLOBs. This makes your SharePoint database grow abnormally large and bloated. Sql Server is optimized for relational data not BLOB data and hence saving blobs in database has a severe performance hit. If you externalize the blobs to EBS (External BLOB storage) or RBS (Remote Blob
    Storage), you’ll not only see performance gain but also you can use a cheaper storage
    to save the BLOBs and hence save yourself from storage cost.

    EBS was an interface provided with WSS/MOSS 2007 where as RBS is an interface provided by Sql Server 2008. EBS is supported both in SharePoint 2007 and SharePoint 2010 where as RBS can only be used with SharePoint 2010 and Sql Server 2008.

    NCachePoint, AvePoint, StoragePoint all provide EBS and RBS for SharePoint for BLOB externalization.

If you buy an off the shelf solution for increasing SharePoint performance you can
save yourself from the cost of development and maintenance of any custom solution
which could potentially be error prone if not done right.

Alachisoft has recently released NCachePoint 2.0 (BETA) which has all the above mentioned features and is available at http://www.alachisoft.com/ncachepoint/index.html

Their product sits in front of a distributed cache which saves all your content so the lookup of any resource is amazingly fast and helps a lot in improving performance of SharePoint farm. The good news is that they have a free edition called NCachePoint Express which can be used on WSS 2007 and SharePoint Foundation 2010 (WSS 2010).