Showing posts with label CDN. Show all posts
Showing posts with label CDN. Show all posts

Thursday, February 23, 2017

SharePoint site performance improvement techniques - SharePoint2010/2013 and SharePoint Online

Hi Friends,

In this article we will talk about the Steps to Optimize SharePoint Performance.

This article covers some of the factors which plays a vital role in the performance of the SharePoint site on a high level.

1)    Code optimization


  •  Server side code - Use optimized methods, SPDisposeCheck etc.,


Poor Performing Methods and Properties
Better Performing Alternatives
SPList.Items.Count
SPList.ItemCount
SPList.Items.XmlDataSchema
Create an SPQuery object to retrieve only the items you want.
SPList.Items.NumberOfFields
Create an SPQuery object (specifying the ViewFields) to retrieve only the items you want.
SPList.Items[System.Guid]
SPList.GetItemByUniqueId(System.Guid)
SPList.Items[System.Int32]
SPList.GetItemById(System.Int32)
SPList.Items.GetItemById(System.Int32)
SPList.GetItemById(System.Int32)
SPList.Items.ReorderItems(System.Boolean[],System.Int32[],System.Int32)
Perform a paged query by using SPQuery and reorder the items within each page.
SPFolder.Files.Count
SPFolder.ItemCount


  • CSOM - Keep ExecuteQuery function call as less as possible.
Also request properties whichever required. Ref below example

var userObj = clientContext.Web.CurrentUser;
clientContext.Load(userObj, user => user.Title, user => user.LoginName);




  • Use caching in Code (Both CSOM and Server Side). Use the cache duration depends on how often the block of code changes the data.

2)    Merge JS files to single wherever possible.

3)    Make JS files to minified (min) files.

4)    Reduce the usage of global variables in JS files.

5)    Merge CSS files to single wherever possible.

6)    Use CDN(Content Deployment Network) deployment of JS, CSS and Images.

Note: Using CDNs only makes sense in a SharePoint Online context and should be avoided with SharePoint Server.


Hope this helps...

Popular Posts