Posted on 07 November 2007 @ 15:57
in #MOSS 2007
I just went to my first session on SharePoint during this edition of TechEd: “Building a High Performance .com Site on Microsoft Office SharePoint Server 2007”. Spencer Harbar brought us an informative overview of the top things to take into account in regards to performance in WCM SharePoint sites.
Here are some of my notes:
- Performance considerations must be taken into account at the start of the project so that optimization is built into the project from the start.
- Long running processes in web parts: make use of the asynchronous programming techniques to run processes in parallel.
- Accessing the object model:
- always call .Dispose() on SPSite and SPWeb. These are actually managed wrappers to unmanaged code. The .Net garbage collector does not automatically release these objects in a timely fashion. - use the using()statement. This statement automatically calls the .Dispose() method for you.
- When accessing collections via a property of an object, make a local variable to hold the collection and then access the local object. This going much faster, up to 25% performance increase.
- Use the Content Query Web Part CQWP): it’s optimized and uses internal caching of queries that no custom web part can achieve, by far.
- Use output caching in MOSS: this is not active by default but is a great increase in performance and can very easily be activated via the site settings interface.
- Loading of core files (core.js mainly): this added a runtime by SharePoint but is often not useful for pure front-end WCM sites. There is a workaround to delay load the core.js file so that the rest of the page gets sent to the client and loaded first.
- When creating WCM sites do not use the default WCM publishing site and those master pages as the basis. These contain a lot of embedded tables that do not load fast. Create a clean master page and CSS files, taking advantage of CSS2 features for example (that’s my own addition here).
That’s a quick list of things to take into account. Spencer will probably post on this on his website so do check out at http://harbar.net
BTW, check out Joris’ blog post about the keynote at TechEd. Some interesting announcements were made there.
|