Boost Your Local Sitecore Performance: A Simple Patch to Speed Up Your Application!
Hey Sitecore Developers! ??
Are you looking to speed up your Sitecore applications, especially when you're working in non-production environments or development? Here's a simple patch that can make your application run faster by disabling some common, unnecessary settings, including turning off Marketing XDB.
Why does this matter? Sitecore has a lot of default features related to analytics, marketing, and data collection that can be helpful in production but may slow down your application during development or testing. For instance, the XDB (Experience Database) can be quite heavy on performance if it's not required for your current work.
What does this patch do? This patch file disables unnecessary settings that can be a performance drain. For example, we will turn off:
By applying this patch, your Sitecore environment will run more smoothly and faster without the overhead of unnecessary background tasks.
?? How to apply it? I’ve prepared a simple configuration patch that you can drop into your Sitecore setup to achieve this. Simply add it to your App_Config folder and restart your Sitecore instance.
The patch will:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="https://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<!-- Disable xDB to avoid unnecessary overhead for local development -->
<setting name="Xdb.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable xDB tracking for local development, as tracking user actions is not necessary -->
<setting name="Xdb.Tracking.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Analytics to avoid processing analytics data that won't be used locally -->
<setting name="Analytics.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Device Detection, which is typically used for advanced features like mobile targeting -->
<setting name="DeviceDetection.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Customer Engagement Scoring (CES) to avoid unnecessary processing -->
<setting name="CES.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable GeoIP services as they aren't needed for local development -->
<setting name="GeoIp.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Personalization to simplify local development and reduce unnecessary overhead -->
<setting name="Personalization.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable client-side tracking of IDs (not needed for local development) -->
<setting name="Sitecore.Client.ID">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable all tracking for client-side interactions, making the environment more lightweight -->
<setting name="Sitecore.Client.DisableAllTracking">
<patch:attribute name="value">true</patch:attribute>
</setting>
<!-- Disable Campaign Management if you're not working with marketing campaigns locally -->
<setting name="Campaigns.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Marketing Automation features, which are typically not needed in a local environment -->
<setting name="MarketingAutomation.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable xDB Search Index if you're not using it for local development -->
<setting name="XdbSearchIndex.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Referrer tracking for local environments where you don't need to track referring sources -->
<setting name="Tracking.Referrer">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Engagement Plans if you're not using them locally -->
<setting name="EngagementPlans.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Email Tracking, since we don't need email tracking features in a local development environment -->
<setting name="Tracking.EmailTracking.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable the Email Experience Manager (EXM) since it is not necessary for local development -->
<setting name="Sitecore.EmailExperienceManager.Enabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
<!-- Disable Email Link Tracking, since it's unnecessary for local development -->
<setting name="Tracking.EmailLinksEnabled">
<patch:attribute name="value">false</patch:attribute>
</setting>
</settings>
<!-- Reduce HTML cache lifetime to 1 second to speed up local development -->
<caching>
<htmlCache>
<patch:attribute name="lifetime">1</patch:attribute> <!-- Set lifetime to 1 second -->
</htmlCache>
</caching>
</sitecore>
</configuration>
Feel free to reach out if you have any questions or need help with implementation.
Let's optimize Sitecore and make our development process even faster! ??
#Sitecore #SitecoreDev #PerformanceTuning #XDB #Marketing #DevelopmentTips #SitecoreOptimization
Senior Software Engineer at Indegene | Sitecore 10 Certified Developer | .NET MVC | SXA | Scriban | CSS,JS,JQuery |
1 周Sitecore performance/loading time in local server is often overlooked. This patch is very much useful. Thank you for sharing.