---
title: "SXA Storefrontのパフォーマンス設定"
slug: "performance-settings-for-sxa-storefront"
abstract: "ストアフロントのパフォーマンス最適化方法の概要。"
---
# SXA Storefrontのパフォーマンス設定

このトピックでは、SXA Storefrontのパフォーマンスを最適化するためのガイドラインを提供します。

> !注さらなるパフォーマンス情報は [、Experience Commerceパフォーマンスホワイトペー](https://doc.sitecore.com/resources/sitecore-performance-white-paper-xc-92.pdf)パーでご覧いただけます。追加のSitecore Experience Platformキャッシュオプションについては、「 [キャッシュの設定](https://doc.sitecore.com/xp/en/developers/100/platform-administration-and-architecture/configuring-caching.html)」をご覧ください。SXAパフォーマンスを向上させるための推奨事項については、「 [SXAベストプラクティス](https://doc.sitecore.com/xp/en/developers/sxa/100/sitecore-experience-accelerator/recommendations--enhancing-sxa-performance.html)」をご覧ください。
> 
> [GlobalCatalogPolicy](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/catalog-and-relationship-policies.html "Catalog and Relationship policies")で定義された設定もパフォーマンスに影響を与えることがあります。

## AJAXコール

Commerce Search Resultsレンダリングの性能を向上させるために、使用する[AJAXコール](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/understanding-asynchronous-calls-and-caching.html "Understanding asynchronous calls and caching") 数を設定できます。

## カート構成

パフォーマンスを向上させるために、[ミニカートカウントキャッシュ](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/configure-the-minicart-rendering.html#UUID-748f79b4-4815-368d-3e5a-cfa70bde56e0_para-idm273159059346790) 設定を有効にし、サーバー側の [ミニカート再計算](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/configure-the-minicart-rendering.html#UUID-748f79b4-4815-368d-3e5a-cfa70bde56e0_para-idm273159059325636) 設定を無効にしてください。デフォルトでは、これら両方の設定は有効です。コマースカートレンダリング(ミニカートレンダリングを含む)に関する情報は、[コマースカートレンダリング](https://doc.sitecore.com/xp/en/users/100/sitecore-experience-commerce/commerce-cart-renderings.html)をご覧ください。

## Content Delivery Networks

パフォーマンスを向上させるために、Content Delivery Network (CDN)をソリューション全体と特にCommerce Search Resultsレンダリングで組み合わせ、分散環境や複数のCDインスタンスが使用可能なクラウド上で利用可能です。HTMLの [キャッシュ](https://doc.sitecore.com/xp/en/developers/100/sitecore-experience-manager/configure-html-caching.html) がサイト全体で行われるか個別ページに限定するか、ブラウザキャッシュが無効化されているか、サイトごとのキャッシュサイズを決定するのはSXAのサイト設定です。

Commerce Search ResultsレンダリングでのCDNの利用についての詳細は、「 [製品リストの利用可能なレンダリングの選択](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/choosing-between-available-renderings-for-product-lists.html "Choosing between available renderings for product lists") 」および [「非同期呼び出しとキャッシュの理解](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/understanding-asynchronous-calls-and-caching.html "Understanding asynchronous calls and caching")」をご覧ください。商業レンダリングにおけるHTMLのデフォルトキャッシュの概要については、「 [キャッシュSXAストアフロントレンダリング](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/caching-sxa-storefront-renderings.html "Caching SXA Storefront renderings")」をご覧ください。

## プロダクトリストキャッシュ

パフォーマンスを向上させるために、[製品リスト](https://doc.sitecore.com/xp/en/users/92/sitecore-experience-commerce/en/commerce-catalog-renderings.html#UUID-25d91fd6-fd1f-54ee-ffcd-d7ee1a1841de_para-idm273160451854666)レンダリング(/sitecore/Sontent<tenant>/<site>/Settings/Commerce/Product List Cache Configuration)で[結果のキャッシュ](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/configure-the-product-list-cache.html "Configure the Product List cache")を設定することができます。デフォルトでは製品リストキャッシュは有効ではなく、Sitecore XC 9.3以降、デフォルトのStorefrontサイトテンプレートではレンダリングが使われなくなりました。詳細は[「利用可能なレンダリングの選択](https://doc.sitecore.com/xp/en/users/100/sitecore-experience-commerce/choosing-between-available-renderings.html)」をご覧ください。

## レンダリングキャッシュ

パフォーマンスを向上させるには、[SXA Storefrontレンダリング](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-commerce/caching-sxa-storefront-renderings.html "Caching SXA Storefront renderings")を設定することができます。デフォルトではレンダリングキャッシュは最適設定に設定されています。しかし、自分でレンダリングを作成する場合はレンダリングキャッシュを検討する必要があります。各サイトごとに[SXA Asset Optimizer](https://doc.sitecore.com/xp/en/developers/sxa/100/sitecore-experience-accelerator/the-asset-optimizer.html)を使ってCSSスタイルやJavaScriptを最適化できます(/sitecore/Content/<tenant>/<site>/Presentation/Page Designs)。デフォルトではこれらの設定は有効にされていません。

## Search logs

[検索ログ](https://doc.sitecore.com/xp/en/developers/100/platform-administration-and-architecture/the-search-and-indexing-configuration-files.html)にはSitecoreが実行する検索クエリに関する情報が含まれています。AzureやSolr検索のパフォーマンスを向上させるには、設定ファイルに以下の変更を加えてください。

デフォルトでは、Sitecore XP設定ファイル(App\_Config/Sitecore/ContentSearch/Sitecore.ContentSearch.config)では、Sitecore.Diagnostics.SearchログレベルがINFOに設定されています。ログエントリ数と必要なストレージ容量を減らすために、本番環境に入る前にSitecore.Diagnostics.Searchログレベル設定をWARNに設定してください。

また、「 [Azure SQLのモニタリングと維持](https://doc.sitecore.com/xp/en/developers/100/sitecore-experience-manager/monitoring-and-maintaining-azure-sql.html) におけるパフォーマンス最適化」および [「Experience Commerceパフォーマンスホワイトペー](https://doc.sitecore.com/resources/sitecore-performance-white-paper-xc-92.pdf)パー」も参照してください。

## ショッピングカートページ

ショッピングカートページにアクセスしたり更新したりすると、AJAXの1回のコールがCXACartContextにかけられます。 CXACartContextコマースエンジンに現在のカート情報を取得し、ページ上のすべてのレンダリングに渡します。

無料ギフトセレクションレンダリングは、サーバーサイドでコマースエンジンに呼び出しを行い、カート、価格、在庫情報を取得します。つまり、商品詳細ページ(PDP)で無料ギフトセレクションレンダリングを使うと、PDPページが頻繁にアクセスされるためパフォーマンスに影響がある可能性があります。一方、ショッピングカートページはアクセス頻度が少ないため、フリーギフトセレクションレンダリングを置くのに適した場所かもしれません。

## テーマ

デフォルトでは、テーマ最適化スクリプト(sitecore/System/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Scripts)とスタイル(sitecore/System/Settings/Foundation/Experience Accelerator/Theming/Optimiser/Styles)モードは開発段階で使用されるため無効に設定されています。本番環境に入る際には、これらの設定を「連結」と「最小化」に設定することを推奨します。これにより、データのスループットを減らし、応答時間を短縮できます。