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 tohttp://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.


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

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

[code language="xml"] 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>() }; } }[/code]