Sitecore8: Experience Editor Slow

Disclaimer: This issue is now resolved in Sitecore 8 – Update 3! What a heck the very first line of a blog post is a disclaimer.

Most of my recent blogs on Sitecore would give you an idea that I was working on and upgrade project to Sitecore 8. I would like to share one of my encounter with Sitecore Experience Editor (so called Page Editor for older versions of sitecore), it was loading damn slow and taking about 3 minutes. Honestly didn’t expected it to be so long.

I was already aware that Kamsar has a blog post to improve the performance of Experience Editor. So I tried all the solutions mentioned at Sitecore 8 Experience Editor Performance Optimization and I was unlucky as these didn’t worked for us.

The first thing, I started to look at was checking the page load time. Wanted to ensure that there are no resources that are taking more time to load. Luckily found the problem, the Network tab showed that a request “Optimization.SuggestedTests.Count” was taking around 2.4 minutes of the total load time. The request was being made to

http://MyDemoWebSite/-/speak/request/v1/expeditor/Optimization.SuggestedTests.Count.

Sitecore Experience Editor

Second immediate step I did was hitting /sitecore/admin/showconfig.aspx and check for “Optimization.SuggestedTests.Count” here I found that that are few request generated like,

  • ActiveTestsCountRequest
  • HistoricalTestsCountRequest
  • SuggestedTestsCountRequest

All being part of Content Testing framework.

showconfig

Based on the patch:source attribute, I visited App_Config/Include/ContentTesting/ Sitecore.ContentTesting.config and commented the request for SuggestedCount. Doing this completely broke the Experience Editor and still I can see the request was being made to Optimization.SuggestedTests.Count

Suggested Count

Solution

So now what should be done the deadline for the project was already ticking and we needed to fix it. Below two solutions came to our mind,

  • Disable Optimization Tab loading by removing the read rights from Sitecore Security Editor.
  • Replace Sitecore.ContentTesting.Requests.ExperienceEditor.SuggestedTestsCountRequest with our own customized code. Well this is what we did and was also suggested by Sitecore Support Team.
 public class SuggestedTestsCountRequest : PipelineProcessorRequest<ItemContext>
 {
 private readonly IContentTestStore contentTestStore;

 public SuggestedTestsCountRequest() : this(ContentTestingFactory.Instance.ContentTestStore)
 {
 }

 public SuggestedTestsCountRequest(IContentTestStore contentTestStore)
 {
 Assert.ArgumentNotNull(contentTestStore, "contentTestStore");
 this.contentTestStore = contentTestStore;
 }

 public override PipelineProcessorResponseValue ProcessRequest()
 {
 IEnumerable<SuggestedTestSearchResultItem> suggestedTests = this.contentTestStore.GetSuggestedTests(null, null);
 return new PipelineProcessorResponseValue { Value = suggestedTests.Count<SuggestedTestSearchResultItem>() };
 }
 }
Advertisements

5 Responses to “Sitecore8: Experience Editor Slow”

  1. mawkstiles Says:

    Can you elaborate on what changes you made in the override? It was still running slow for me.

    Whatever is happening deeper in the method seems to be dragging on but the response is oddly around 3 minutes for me too.

    If I just ignore calling the GetSuggestedTests method and return 0, thats the only way I can speed it up but of course, that’s just disabling the functionality.

  2. Solving Experience Editor Slowness part-1 | Learn Sitecore Basics. Says:

    […] But what if we want to keep Speak UI? We have started observing the different components load time and we found that Suggested Test Count is causing the issue. Suggested Test Count takes more than 70% of Page load time. So, using the following link we have disabled the Suggested Test Count. https://blog.horizontalintegration.com/2015/07/05/sitecore8-experience-editor-slow/ […]

  3. Flux Digital - Manchester based web development and consultancy Says:

    […] Sitecore Experience Editor is very powerful but if you have lots of components on a page it can be slow to load sometimes. Because of this as a Sitecore developer you often find yourself looking at what you can do to speed it up. The first steps are usually to ensure you are following the recommendations in Sitecores Performance Tuning Guide. Also in more recent versions of Sitecore such as Sitecore 8.2 there are improvements in the performance of Experience Editor by Lazy Loading components in the Ribbon and so on – so if upgrading in the immediate future is an option this is recommended. If it isn’t and you are stuck on Sitecore 8.1 then also look at the following potential improvements: Disabling the My Items count (there is also a Support Hotfix for this now) and turning off the Suggested Tests count. […]

  4. himanshu Says:

    Namespace for IContentTestStore??


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: