Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Sunday, November 27, 2011

Hidden Gem of Sitecore Page Editor


During performance profiling of Page Editor I’ve noticed that the “My Items” button was taking a lot of CPU time to render. ANTS Performance Profiler was very kind to tell me that with no hesitation.

Monday, October 17, 2011

Sitecore Media Library Performance Optimization Checklist


Here is a quick checklist that you can use in order to get more performance out of your Sitecore Media Library’s delivery.

Monday, September 20, 2010

Optimize Sitecore Performance Checklist


Greetings! I’ve stumbled upon this hot discussion on StackOverflow about Sitecore CMS performance and could help but sharing a few thoughts on the subject.
The message I am trying to convey is that the product is built for performance and scalability. After seeing a fair number of successful implementations that have the unlimited scaling capacity, it is sad for me to see some developers struggle.
We all love checklists, so here is a slightly modified list of things to look out for and try out when you start having performance degradation. Each case is special, so apologies if most of this is not applicable to your situation.

Friday, April 02, 2010

Sitecore Installation Wizard – disable search index update during install


OK, now after my April Fools joke, let’s talk about serious things around Sitecore .NET CMS. Such as how to speed up installation of Sitecore packages.
One of the things that improve the performance of the package installation is disabling the search index update temporarily via the following setting:

<setting name="Indexing.UpdateInterval" value="00:00:00" />

Setting this interval to all zeros actively disables the background index update job that maintains Sitecore’s search index.

While you can certainly do this manually, it is not always feasible since you need to edit web.config (have access to the server, etc) plus it restarts the application.

What you can do however is to add some logic to the Installation Wizard, specifically a flag to temporarily disable the search index updates during the package installation:
clip_image002

To make this happen, do the following:

1. Create the following class in your project and compile it.

namespace SCUSAINC.Custom.Packager
{
   using System;
   using Sitecore.Reflection;
   using Sitecore.Web.UI.HtmlControls;
   using Sitecore.Web.UI.Sheer;
   using Sitecore.Shell.Applications.Install.Dialogs.InstallPackage;

   public class CustomInstallPackageForm : InstallPackageForm
   {
      [HandleMessage("installer:setTaskId")]
      private void OnSetTaskId(Message message)
      {
         var obj = this as InstallPackageForm;
         ReflectionUtil.CallMethod(typeof(InstallPackageForm), obj, "SetTaskID", true, true, new object[] { message });
      }

      [HandleMessage("installer:commitingFiles")]
      private void OnCommittingFiles(Message message)
      {
         var obj = this as InstallPackageForm;
         ReflectionUtil.CallMethod(typeof(InstallPackageForm), obj, "OnCommittingFiles", true, true, new object[] { message });
      }

      protected Checkbox DisableIndexing;

      protected override void OnLoad(EventArgs e)
      {
         DisableIndexing.Checked = false;
         base.OnLoad(e);
      }

      protected override void OnNext(object sender, EventArgs formEventArgs)
      {
         base.OnNext(sender, formEventArgs);
         if (Active == "Installing" && DisableIndexing.Checked)
         {
            Sitecore.Configuration.Settings.Indexing.Enabled = false;
         }
      }

      protected override void EndWizard()
      {
         base.EndWizard();
         if (DisableIndexing.Checked)
         {
            DisableIndexing.Checked = false;
            Sitecore.Configuration.Settings.Indexing.Enabled = true;
         }
      }
   }
}

2. Copy the following file to the /sitecore/shell/override folder: \sitecore\shell\Applications\Install\Dialogs\Install package\Install Package.xml

3. Open this XML file

4. Change the CodeBeside reference in the XML source file to your custom name:

<WizardForm Application="Tools/Installer/InstallationWizard" CodeBeside="SCUSAINC.Custom.Packager.CustomInstallPackageForm,SCUSAINC.Custom ">

5. Add the checkbox definition to the XML source:

<WizardFormPage ID="Ready" Header="Ready to Install" Text="The wizard is ready to install the package. Click Install to install the package." Icon="People/32x32/Box_Software.png">
   <WizardFormIndent>
     <GridPanel Columns="2" CellPadding="2" Width="100%">
            …
     </GridPanel>
     <Checkbox ID="DisableIndexing" Header="Disable search index update during the install" Checked="True" />
   </WizardFormIndent>
</WizardFormPage>

Based on my tests, this significantly decreases the installation time (up to a half), especially on high volume packages in terms of content items.

Special thanks to Paul from Sitecore Support and Sergey from the development team for the assistance with this!

Thursday, March 11, 2010

Sitecore startup time - something that could improve it


One of the things any Sitecore developer had to deal with is startup time. There are tons of reasons why an application pool may restart (file change notification, config change, etc.) so this generally happens pretty often, especially on a development machine.
So I decided to spend some time on the problem and engaged our brilliant technical support into this little project.

Thursday, September 03, 2009

Announcement: Partial (Item) Cache Clearing Module - SitecoreStager


Great news! We have released a shared source component that implements partial cache clearing model. Make sure to download the tool and read more about it. Since it is Shared Source, make sure you understand the support restrictions, etc. first before deploying the tool to production.

This tool does not substitute the Staging module as it provides cache clearing only, not file upload/download functionality.

For the implementations with frequent publish operations enabled (from workflow or single item publishes) and especially for multisite environments, this will significantly improve the performance of the delivery system and take the load off the SQL Server.

What I love about the tool is that the code is available so if there are specific architectural considerations for your implementation, you can reuse the code and implement the solution that fits your needs.

Kudos to Alexey Romaniuha for the actual implementation.

Enjoy and don’t forget to provide feedback!

Friday, July 17, 2009

Item, Memory and Timing Thresholds Demystified


There seem to be a lot of confusion on the forums on this topic, so the doc team updated the article about why the warnings are commonly appearing in live environments even when the code is optimized.

The basic idea is that the functionality was not designed for usage under load tests or in production, so the best way would be to simply disable this functionality in production systems. Otherwise, your log files will be just filled with warnings and it will make difficult reading them.
To disable, simply remove the StartMeasurements processor from the “httpRequestBegin” pipeline and “StopMeasurements” from “httpRequestEnd”.

I suggest you do use the thresholds in QA when running tests, just make sure you have a single request test to identify the problematic pages.

Same rules apply to media requests that report threshold violations. If this happens under a single user load, make sure you don’t have a crazy number of items in the requested branch. I’ve seen media libraries when that was the case.

Take it easy.