Skip to main content

Devops

Looking for ways to boost performance in your Sitecore instance? Check out these 3 tips!

Jttc Boost Performance Sitecore 01

Last week in Orlando, Sitecore announced that in the upcoming 9.1 version we should expect some major performance improvements to the system. But until we get 9.1, what can be done to improve Sitecore performance? Here are 3 handy tips you can use to boost your development instance.

You can also read the posts from Kam Figy and a patch file removing some features from Sitecore by Alex Shyba.  Both posts have some useful insights on things you can do.

But before you do, keep in mind that these tips may remove some of Sitecore’s functionalities – so I wouldn’t recommend applying them in staging and specialty production environments. I recommend using them in local setups to speed things up while developing your website.

Also, the suggestions pertain to Sitecore 9 and should work on lower versions. If you are on lower versions, the paths to the configuration files will be different, so keep that in mind.

1 – How can you tell what’s taking your Sitecore instance so long to load?

Let’s say you are launching your website and that doing something simple like accessing the lauchpad or content editor is slow. In this scenario, let’s also assume that you have already checked your Sitecore logs and no exceptions are being captured. How can you determine what’s causing the slowness?

Sitecore enables you to profile your instance and check how much time each pipeline is taking to be processed, as well as how many times they are called. This is probably the first thing you should do to check if you are experiencing a slowdown. Add the following key entry in the appSettings of your Web.Config:

 

<add key="env:define" value="Profiling" />

After saving the web.config, the application pool of your Sitecore instance will be recycled so it will be a good way for you to profile a Sitecore cold start. Go to the login page http://myinstance/sitecore/login

After authenticating, you can open the following page:

http://myinstance/sitecore/admin/pipelines.aspx

This is a very useful troubleshooting page as it will output how many times each pipeline is executed and how much time each of them is taking to load. You can also check the ones with the red icon which are the most time-consuming ones:

 

 

2- Are you creating A/B testing as part of your implementation? If no, check this out:

One of the things that I found in my instance while opening the pipelines page is that the Item Provider for A/B testing was slowing my instance down a lot. Since I knew I was not going to write A/B testing I commented it out.

To do so, open your Website folder and navigate to App_Config/Sitecore/ContentTesting and open the Sitecore.ContentTesting.config file. Comment the following processor out (I say comment it out because you might want to uncomment it back so it’s easier that way):

 

<processor type="Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor, Sitecore.ContentTesting" />;

 

Again, the trick here is to check which are the most time-consuming pipelines and remove them if you don’t need it. There were others on testing I could remove as well but their impact was not significant.

 

3. Are you using Sitecore backend in English language only?

Sitecore by default comes with 4 languages for the backend: Danish, German, English and Japanese. These languages are the ones that Sitecore supports out of the box to use tools like Content Editor, Experience Editor, etc. But if you are like me that only uses Sitecore in English, mostly because you don’t know the other languages :p, you can remove the other 3 languages in the Core database.  Why would I do that? Because of this:

 

 

This is my default instance performance in cold start with the default languages in place. Looking at this you can check that it’s taking a little more than 5 seconds to open content editor because of this pipeline execution which is related to translation of the backend for languages I’m not even using which is why I decided to remove them.

To do so, open Sitecore in Desktop mode and switch to the core database. Navigate in the content editor to the sitecore/system/Languages path and remove the ones you don’t need. In my case, I left English only.

That’s it, now after each build and deploy I’m boosting my local instance restart in 5 seconds. That may not sound much, but if you are doing this a lot during the day it’s something good to have.

Well that’s it for today, but remember:

Be smart while making these changes. Don’t remove certain pipelines of your system or you will end up breaking Sitecore. Think about which languages you’ll need or you could regret removing a certain language you are going to need it sometime in the future. Check your pipelines page and see what Sitecore is profiling for you and go from there.

And don’t forget to remove from your web.config the profiling tag once you are done 🙂

Thoughts on “Looking for ways to boost performance in your Sitecore instance? Check out these 3 tips!”

  1. Here’s a code snippet to remove that processor Diego mentions… you can drop this into a config file in App_Config/Include if you want to avoid modifying Sitecore’s configuration files.

    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
      <sitecore role:require="Standalone or ContentManagement or ContentDelivery or Reporting or Processing">
        <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>
    

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Diego Moretto

Diego is a software developer with over 13 years of experience. He enjoy building new things, solving problems, learning new technologies and becoming a better developer every day. Ten years ago he started working with .Net and became impassioned with the platform. Since early 2011 Diego's work has been fully dedicated to Sitecore and anything related to its ecosystem. He is a Sitecore certified developer and most recently was awarded the Sitecore Technology 2017, 2018 and 2019 MVP. In his personal time Diego likes playing video games and tennis, and spending quality time with family.

More from this Author

Categories
Follow Us