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.
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:
&lt;add key="env:define" value="Profiling" /&gt;
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:
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):
&lt;processor type="Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor, Sitecore.ContentTesting" /&gt;;
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 🙂