18Jan, 2021
Speeding up Sitecore Starts for Better Experiences, From Dev to Production
Ok, using Falcon Heavy's engines as my banner is a little dramatic, but time is money, and having staff wait for Sitecore restarts can add up over an engagement of several months. I'm constantly looking for more ways to speed process up, so I've put together a couple of tips on speeding things along.
Identifying Issues
Before starting with some specific examples, I thought you might want to know about the Pipeline Profiler. When the key below is added to your web.config you can simply navigate to /sitecore/admin/pipelines.aspx to get an overview for which Pipelines are costing you a lot of time.
<add key="env:define" value="Profiling" />
There's a legend at the bottom of the page, but essentially you want to look at Time / Execution, which is what we care about right now.
Here we've got some Pipelines flagged as being costly. Maybe we should look at that!
English ….., Do you speak it?
Yeah ok there's more to that quote, but sorry Tarantino, this is a (Sitecore) family website!
If your Authors speak English and don't need Danish, German, Japanese and Chinese then you can remove these from the Core database. Why? Well doing so will save you 6 seconds of startup time every time Sitecore recycles. Just follow these simple steps, and don't delete English!
- Switch to the Desktop view.
- In the bottom right, change from Master to Core database.
- Open the Content Editor.
- Navigate to /sitecore/system/Languages.
- Open each language item and unprotect it, then delete it.
Do I really need a counter on My Items button?
Surprisingly, the My Items button is a big performance hit. After working with many clients and authors, I can safely say no one's missing it. Disabling this feature is as simple as altering a standard setting, so I'm including it in all deployments from dev instances all the way through to production.
This setting is only available in Sitecore 9+ mind you, so test out this change on previous versions. It's found in Sitecore.ExperienceEditor.config.
<setting name="WebEdit.ShowNumberOfLockedItemsOnButton" value="false"/>
We don't need any testing!
If you're not using A/B testing you can save yourself quite a bit of time by disabling GetItemUnderTestProcessor. Now, I've seen some other sites recommend altering Sitecore.ContentTesting.config, but this is a really bad idea. You should always patch Sitecore files, so upgrades are easier to perform.
Hey look, a patch! This also includes the changes mentioned in the previous point. I accept Blanton's Bourbon as thank-you gifts :)
<sitecore> <settings> <setting name="WebEdit.ShowNumberOfLockedItemsOnButton" value="false"/> </settings> <pipelines> <group name="itemProvider" groupName="itemProvider"> <pipelines> <getItem> <processor type="Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor, Sitecore.ContentTesting"> <patch:delete /> </processor> </getItem> </pipelines> </group> </pipelines> </sitecore> </configuration>
Let me know if you come across more speed tips, and let's add them here. The more the merrier!