Performance settings for SXA Storefront

Abstract

High-level overview about how to optimize performance for the storefront.

This topic provides guidelines on how you can optimize the performance of SXA Storefront.

Note

You can find further performance information in the Experience Commerce Performance White Paper. For additional Sitecore Experience Platform caching options, see Configuring caching. For recommendations on how to enhance SXA performance, see SXA Best Practices.

Settings defined in the GlobalCatalogPolicy can also impact performance.

To improve performance when using the Commerce Search Results rendering, you can configure how many AJAX calls are used.

To improve performance, enable the minicart count cache setting and disable the server-side minicart recalculation setting. By default, both these settings are enabled. For information about the Commerce Cart renderings (including the Minicart rendering), see Commerce Cart renderings.

To improve performance, you can use a Content Delivery Network (CDN) with the solution in general and with the Commerce Search Results rendering in particular, especially in distributed setups and in the cloud where multiple CD instances can be in use. It is the SXA site settings that determine whether caching of HTML is done site-wide or specifically on individual pages, whether Browser caching is disabled, and the sizes of the caches per site.

For more information on the use of CDN with the Commerce Search Results rendering, see Choosing between available renderings for product lists and Understanding asynchronous calls and caching. For an overview of the default caching of HTML for commerce renderings, see Caching SXA Storefront renderings.

To improve performance, you can configure caching of results for the Product List rendering (/sitecore/Sontent<tenant>/<site>/Settings/Commerce/Product List Cache Configuration). By default, product list caching is not enabled and the rendering is no longer used with the default Storefront site template as of Sitecore XC 9.3. For information, see Choosing between available renderings.

To improve performance, you can configure the SXA Storefront renderings. By default, rendering caching is set to the optimal settings. However, if you create your own renderings then you need to consider rendering caching. You can use the SXA Asset Optimizer for each site to optimize CSS styles and JavaScript (/sitecore/Content/<tenant>/<site>/Presentation/Page Designs). By default, these settings are not enabled.

The search log contains information about the search queries that Sitecore executes. To improve performance with Solr search, make the following change to the configuration file.

By default, in the Sitecore XP configuration file (App_Config/Sitecore/ContentSearch/Sitecore.ContentSearch.config), the Sitecore.Diagnostics.Search log level is set to INFO. To improve performance by reducing the number of log entries and the storage space required, before going into production, set the Sitecore.Diagnostics.Search log level setting to WARN.

When the Shopping Cart page is accessed or refreshed, one AJAX call is made to the CXACartContext. CXACartContext contacts the Commerce Engine to get the current cart information and passes it to all the renderings on the page.

The Free Gift Selection rendering makes a server-side call to the Commerce Engine to get cart, pricing, and inventory information. This means that if you use the Free Gift Selection rendering on the Product Detail Page (PDP), there may be an impact on performance because the PDP page is accessed often. The Shopping Cart page, on the other hand, is accessed less often and may be a better place to put the Free Gift Selection rendering.

By default, the Theming Optimizer Scripts (sitecore/System/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Scripts) and Styles (sitecore/System/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Styles) mode are set to Disabled as they will be used in the development phase. We recommend that you set both these settings to Concatenate and Minify when going into production to reduce the data throughput and improve response times.