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>() };
 }
 }

5 thoughts on “Sitecore8: Experience Editor Slow

Add yours

  1. 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.

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

Blog at WordPress.com.

Up ↑

%d bloggers like this: