Apr 28, 2010

SharePoint Development or Coding Practices to avoid slow performance (i.e. performance degradation)

Few pointers on SharePoint Development or Coding: Best Practices


  • Http Modules and Http Handlers
    • Know the difference between Http Module and Http Handler before using it
    • HTTP module is always called as part of the page processing pipeline, a poorly designed or faulty module can have a detrimental effect on performance or perceived stability of the environment. Thoroughly test each module for performance before deploying it.
    • Use Custom Http Handlers To Improve Performance in ASP.NET (rarely used)


  • Ghosting vs Un-Ghosting
    • All the Pages in the SharePoint are stored in the SQL database but some SharePoint pages lying in the layouts folders on the server are accessed as is. These pages have null as an entry in the sharepoint database. i.e. Ghosted Pages are not stored in the SQL database, they reside on the SharePoint Server folders. The Ghosted pages become unghosted when we modify them (like using SharePoint Designer).
    • Do not unghost the ghosted pages, as this will contribute in degrading the performance.

  •  Custom Stored Procedures preferred compared to SQL Queries
    • Measure performance using SQL Profiler
    • Keep transact SQL smaller, as these create locks.

  • Create Views
    • When we need to pull data from multiple tables and have complex multiple joins. It's preferred to create the views and write queries on top of it, instead of writing and calling complex queries on demand.

  • SharePoint List Views
    • Use proper Index in the SP List Views, i.e. column used in the filter of the views

  • Web Applications in the Farm (2-2-1)
    • Do not have more then 5-7 web applications in the medium size farm
    • Each web application should have it's own application pool

  • NTLM vs Kerbores authentication
    • Kerberos caches information about the client after authentication. This means that it can perform better than NTLM particularly in large farm

  • SSL (http vs https)
    • SSL mostlty degrades the performance

  • Server Round Trips
    • Code to avoid server round trips

  • Views Size
    • Views size should not be more then 2000 items.


 coming more soon ...

No comments:

Pages