If you're a Content Author and spend a considerable period of time within Experience Editor you know the pain well when it takes a long time to load.
This is sometimes due to having a large number of items in the sitecore_suggested_test_index
but as we have wrote about, there are a number of potential sources which cause slowdowns to occur.
We've already shown a few things you can do in terms of speeding up Experience Editor and here I'm going to share another one with you.
Patching
Sitecore does offer a patch for improving the performance of Experience Editor which you can find here: Support Patch 185487. But there are other ways of also improving it. There are multiple versions on that page so be sure to scroll to find the one that works for your environment.
JavaScript
While a patch may work for some, here's another way to resolve the issue but this time through updating the JavaScript.
First step is to locate the following file:
\sitecore\shell\client\Sitecore\ContentTesting\ShowSuggestedTestCommand.js
Once open, locate the following bit of code (in Sitecore 9.0.0+):
canExecute: function (context) {
var self = this;
self.setLoadingAnimation(true);
context.app.canExecute("Optimization.SuggestedTests.Count", context.currentContext, function (testCount) {
self.setLoadingAnimation(false);
self.fillupSuggestedTestsCount(testCount);
});
Replace the code with the following:
canExecute: function (context) {
var self = this;
// self.setLoadingAnimation(true);
// context.app.canExecute("Optimization.SuggestedTests.Count", context.currentContext, function (testCount) {
// self.setLoadingAnimation(false);
// self.fillupSuggestedTestsCount(testCount);
// });
self.fillupSuggestedTestsCount(0);
Now obviously this just comments out the code, you can delete it but I recommend testing it in your environment before removing it permanently.
Once that change has been done, you'll want your users to clear their browser cache as the JavaScript file will no doubt have been cached in their browsers.
Configuration
There is also another option you can look into. If you are not taking advantage of Content Testing then I strongly recommend you investigate disabling the AutomaticContentTesting setting as shown below. Set it to false
when it's not needed.
<setting name="ContentTesting.AutomaticContentTesting.Enabled" value="false" />
We're always looking at ways we can improve the Sitecore experience. Stay tuned for many more tips and tricks to improve your environments.