BLOG

Img
Subramanian Ramanathan
img
3 Minute read

Blazing Fast Sites on Sitecore

Website performance has been playing a crucial role in defining User Experience and User Retention, and it has now become even more critical with Google’s ranking algorithm attributing greater importance to the website speed.  Blazing fast websites amplify user acquisition, engagement, and retention, resulting in higher conversion rates.

It is recommended to implement the performance best practices well in advance, as you build the website. Working on performance tuning after it becomes a concern, might be too late, as it would have already affected user acquisition and retention. Here are certain key factors to consider while building websites on Sitecore:

 
CACHING
  • Tune Sitecore Caches
    • Item Cache
    • Data Cache
    • Prefetch Cache
    • HTML Cache
    • AccessResult Cache
    • Custom Cache (based on Sitecore.Caching.CustomCache)

    Under Load Test, the cache size of Sitecore Caches must be 70-80% allocated, but within the RAM capacity. Initial Values for Cache Tuning Procedure can be referred in Sitecore Documentation.

  • Enable HTML Cache for Components with appropriate Vary By Option
  • Customize default HTML Caching to cache components under Personalization, A/B Testing and by Cookie etc. as needed. This will assist in storing and serving all the variations of a component from HTML Cache, enhancing the performance
  • Segregate feasible heavy logics into async calls to enable HTML Caching
  • Enable Browser Caching for Static files in IIS with proper expiration
  • Avoid Inline Styles and Scripts as it could affect Performance as well as SEO
  • Configure CDN for Media Items
  • Utilizing CDN for HTML will obviously limit Sitecore Capabilities including Personalization, A/B Testing, Analytics, Marketing Automation etc. and alternative solutions need to be defined and implemented before caching HTML Markup only when it is absolutely necessary
  • A complete analysis of all the capabilities available in the opted CDN needs to be performed to ensure maximum performance benefit. Certain CDNs provide options to store different variations of Pages.

RESOURCES

  • Use Async/Defer attributes for scripts
  • Optimize the order of scripts/styles to avoid render blocking
  • Create two bundled scripts – Deferred and Nondeferred, grouping the scripts into two different bundles will help to defer the load of certain scripts that can be executed after page load
  • Use Resource Hints like DNS Prefetch, Preconnect, Preload etc. for external domains.
    • It is recommended to use DNS Prefetch for external resources that are leveraging browser cache
    • Preconnect (with DNS Prefetch as fallback, since few browsers lack preconnect support) is preferred for external domains that do not leverage browser cache
    • Fonts, background images, etc. which are specified in css could be rendered as Preload links. This will ensure that the fonts, background images etc. are downloaded before css is downloaded and parsed, enhancing performance and user experience
  • Swap Fonts with System Fonts using ‘font-display: swap’ or ‘display=swap’ (for https://fonts.googleapis.com/) for displaying content to user early using system fonts before custom fonts are downloaded
  • Render Scaled Images for different devices, which will help in saving few bytes for mobile users resulting in an improved performance
  • Render optimized images with tools like Dianoga etc. for lossless compression
  • Remove unused CSS with online tools
  • Minimize request size by reducing the Url length, cookies etc. if feasible
  • Specify Image dimensions with width and height parameters, this improves the page load time by ensuring that the browsers aren’t waiting for the image to download to find the dimensions of the image, allowing the page to be laid out with appropriate space for the image before the image is downloaded
  • Lazy Load Images, this will improve page load time, especially when there are more images that will need users to scroll down for viewing them and also when images are available within tabs, accordions etc.
  • Use Progressive JPEGs instead of Baseline JPEGs
  • Use Image Formats like JPEG2000, WebP etc.
  • Compression techniques like GZip and Brotli (if possible)
  • Ensure js/css are bundled and minified with proper Bundling & Minification tools

SEARCH

  • Ensure effective usage of supported search platform (SOLR/Azure/Coveo)
  • Leverage Search Platform where Source is expected to grow more
  • Create Custom Indexes while using Search Platform for website functionalities
  • Optimize Indexes by indexing only required fields
  • Configure appropriate Source location for indexes
  • Utilize Master/Slave Configuration for SOLR
  • Leverage Replicas in Azure Search with Load Balancer
  • Use Sitecore Query/Fast Query only when needed
  • Limit the usage of GetDescendants and GetAncestors as it could affect performance based on the number of total descendants/ancestors

INFRASTRUCTURE

  • Route Web Traffic through CDN Network by pointing Domains to CDN’s Name Servers, this will reduce the DNS Lookup time
  • Configure TTL as 24 hrs for A Records and CNAME, as they do not change often. Make sure to bring down the TTL well before making any change to the DNS Records to ensure they are not cached at client.
  • Ensure appropriate Vertical Scaling based on utilization of different roles
  • Add more servers to scale horizontally for the required roles with Load Balancer based on the load
  • Sitecore License terms must be reviewed before making any scaling operation. Perpetual License will have limits and Sitecore Representative must be contacted.
  • Opt Data Centers based on the Geography of Users
  • Ensure servers are able to accommodate projected No. of Users and Sessions
  • Address all the Exceptions by frequently analyzing Logs
  • Use SSD for Database Servers

The following approaches will be helpful when troubleshooting performance issues,

  • Perform Load Tests with jMeter, Gatling, Blazemeter etc.
  • Leverage Sitecore Debug Tool
  • Use Profiling Tools like dotTrace, Dynatrace etc.
  • Use Real User Monitoring with Monitoring tools like Pingdom, Site24x7 etc. to find Real User Performance and Issues
  • Analyze recommendations from Google Lighthouse, GTMetrix etc.
  • Leverage Windows Performance Monitor
  • Utilize WebPageTest for conducting advanced performance tests based on connections, devices, locations etc.
  • Leverage Network Tab of the Browser for quick insights
  • Use Sitecore LogAnalyzer
  • Make sure to optimize the critical parameters,
    • First Contentful Paint
    • First Meaningful Paint
    • Speed Index
    • First CPU Idle
    • Time to Interactive

Improving the website performance is essential for keeping customers happy and driving business growth. Following all the performance best practices will help with blazing fast sites on Sitecore!

LIVE WEBINAR

On- Demand Webinar

Sitecore Cognitive Commerce - Transforming the future of ecommerce

Subramanian Ramanathan Technical Architect


Talk to our Experts

Talk to us about how we bring together 1:1 personalisation, deep Martech Expertise, CX & Demand Gen Strategy, Engagement Analytics & Cross-Channel Orchestration to drive award winning experiences that convert

Get in touch for a complimentary consultation or a demo today.

Expert Workshops

Free workshops, expert advice & demos- to help your realize value with Sitecore

Register

Session Presentations

  • Sitecore + SFMC= Marketing Success
  • Transforming The Future Of eCommerce
Meet Us

Giveaways:

Participate in our event survey , meet us at our booth , get free giveaways & a chance to win an iPhone 11

Let’s go
Close Button