SharePoint Tips to Improve Performance

SharePoint Tips to Improve Performance

 

1.      Use SPWeb.GetList (string ListUrl)  instead of SPWeb.Lists(String ListName).

2.      Use SPList.AddItem.Instead of  SPList.Items.Add.

3.      Use SPUserToken instead of Run with Elevated privileges. 

4.      For CAML Query,Use Viewfields and Row limits to limit the columns and the results returned from the SharePoint list sources.

5.      Caching the Datatable Objects returned by the CAML Query.Use Caching available out of the box like 
        Page Output cache,Object Cache and  Disk  based  (BLOB) cache

6.      Use SPList.GetItems(SPQuery query) instead of SPList.Items(SPQuery query).

7.      Dispose SharePoint Objects Properly by using SPDisposeCheck tool.

8.      Retrieve SPWeb and SPListItem from SPItemEventProperties instead of from a new instance of SPSite in Event handlers

         SPWeb web = properties.OpenWeb(); // Operate on SPWeb object.

         SPListItem item = properties.ListItem; // Operate on item. 

9.      String.compare method is good option to compare two strings instead of converting to lower/upper and then comparing.

10.     Use of StringBuilder wherever the string concatenation is done.

11.     Index the Column in SharePoint list.

12.     Perform IIS compression 


Reference Links

http://blogs.msdn.com/b/sowmyancs/archive/2008/10/26/best-practices-sharepoint-object-model-for-performance-tuning.aspx
http://www.mssharepointtips.com/tip.asp?id=1022
http://blogs.msdn.com/b/pandrew/archive/2009/01/29/spdisposecheck-v1-3-1-is-released.aspx
http://msdn.microsoft.com/en-us/library/bb687949%28v=office.12%29.aspx
http://msdn.microsoft.com/en-us/library/aa973248%28v=office.12%29.aspx









Leave a Comment
  • Please add 4 and 3 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (1 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Maheshkumar S Tiwari edited Original. Comment: Added Tag and minor edit

Page 1 of 1 (1 items)