Imagine browsing on a site that takes awfully long to load or shopping on a portal with links that lead to error reports. The natural reaction would be to jump to the next alternate site that serves your interest minus the technical glitches. A content management site is, therefore, not just about the content but about providing the customer a smooth web experience. A higher performing website also means better conversion rates. It is in this context that we discuss the various ways in which you could improve the performance of your Sitecore website.
Sitecore, as a CMS, is hugely popular due to its robust .NET architecture, powerful scalability, usability and integration with revenue-building resources. However, there are a few things that need to be taken care of in order to keep Sitecore at its best performing ability.
We can broadly define the factors that impact a website performance into three categories:
- Resources: Insufficient network bandwidth or inadequate hardware support.
- Configuration: Redundant Http requests or codes with incorrect syntaxes.
- Developmental: Sub-optimal layouts of a website that hinder faster downloading.
Let’s look at some measures that can ensure a glitch-free experience for the customer on a Sitecore site.
- Using an updated Windows OS server to host the site like the Windows Server 2008 R2 x64 that has better bug-fixing features as compared to its earlier version.
- Using servers that have a good physical memory, (at least 12GB) and faster processor (a minimum of 2.2 GHz) will ensure that the cache size also increase proportionally, leading to better performance.
- System configuration settings need to be adjusted so that the performance of the website is not slowed down. Simple changes, like disabling the screen saver and scheduling anti-virus scans during non-working hours can bolster the speed of the site.
- Use a dedicated network for database traffic and one NIC for visitor traffic. Make sure all the related SQL databases are on the same network.
- Regular clean-up of database tables is highly recommended. Tables like History, PublishQueue, and EventQueue need to be cleaned or truncated periodically.
- Accumulated data on Cache memory slows down a site in more ways than one, hence it becomes imperative to clear up the cache on a regular basis.
- Keep the initial Prefetch minimum or disable it to have a faster start-up.
- Make the renderings on the site cacheable. Also, increase the size of prefetch and other caches. A good thumb rule to remember is a bigger cache=better performance. Using HTML caching is reported to improve performance.
- Avoid frequent publishing as HTML cache is cleared every time the publish button is hit. Also, it is recommended that content authors use Incremental or Smart Publishing rather than Full Publishing.
A common error is to set “compilation debug=true”. This triggers a set of actions that slow down the site. Codes may take longer than usual to get executed since the debugging paths have been enabled. A lot of memory gets consumed. Scripts and images are not cached.
- Redundant HTTP requests can be eliminated by using a content expiry date. Expired headers instruct the browser to fetch the file from the browser’s cache rather than downloading it once again from the server. Setting an expiry date reduces the load of downloads from the server (constantly downloading the same file when it’s unmodified is wasting precious load time) by reducing the number of HTTP requests for the server.
- Re-directs, DNS lookups and errors like HTTP 404, query strings in the URL of static resources affect web performance and need to be avoided.
- Image sizes need to be optimized to reduce the response time. Resize image size on the server rather than on the client and also use a graphic optimizer. Instead of setting the HTML height and width of an image, use an ashx handler.
- Cookies sent with static image requests get ignored by the server and these are also the cause for unnecessary traffic. Hence, it is recommended to eliminate unnecessary cookies and use cookie-free requests in case of static components.
- Every time an application restarts, Sitecore maintains a log file. If these restarts happen often, the log files need to be checked for the reason and analysed.
- Sitecore databases need to be maintained on a regular basis to boost performance. Obsolete versions need to be deleted and ensure that there are no more than 5-10 versions per item in the master database.
- Search indexes have to be periodically re-indexed and if not in use, they need to be disabled. Ensure that Sitecore items do not contain more than 100 children per item. Instead of Rich text fields, it is recommended to use multiline text fields.
- It is useful to deploy performance metrics analytics like GTmetrix that analyses site performance. Google Developer’s PageSpeed gives great insights about the content and suggests ways to make the web page faster. It is also integrated with Google Analytics.