Performance issue with the My items functionality


Description

The My items dialog box in the Content Editor or the Experience Editor is designed to locate and display items that are locked by the current user. To do this, the entire content tree must be inspected. As the volume of content grows in the solution over time, more time is spent on this operation.

Possible solutions

The Sitecore Platform architecture allows several ways to find all items with a certain field value:

Summary

Each approach provided by Sitecore architecture has its own benefits and drawbacks. 

Solution 1 (Applicable For Sitecore CMS 7.2 — XP 7.5)

  1. Download the Sitecore.Support.419438.dll assembly to the \bin folder.
  2. Download the Sitecore.Support.419438.config file to the \App_Config\Include folder.

Note: This patch can be applied only if you maintain the Quick search index. Please make sure that the index update interval is not set to "00:00:00":

<-- INDEX UPDATE INTERVAL
Gets the interval between the IndexingManager checking its queue for pending actions.
Default value: "00:05:00" (5 minutes)
-->
<setting name="Indexing.UpdateInterval" value="00:05:00 />"

Solution 2 (Applicable For Sitecore CMS 7.2 — XP 8.1 Update-2)

  1. Download the Sitecore.Support.419438.dll assembly to the \bin folder.
      • For Sitecore CMS 7.2 — XP 8.0:
           • Lucene: Sitecore.Support.419438.dll
           • Solr: Sitecore.Support.419438.dll
      • For Sitecore XP 8.1:
           • Lucene: Sitecore.Support.419438.dll
           • Solr: Sitecore.Support.419438.dll
  2. Download the Sitecore.Support.419438.config file to the \App_Config\Include folder.
      • For Sitecore CMS 7.2 — XP 8.0:
           • Lucene: Sitecore.Support.419438.config
           • Solr: Sitecore.Support.419438.config
      • For Sitecore XP 8.1:
           • Lucene: Sitecore.Support.419438.config
           • Solr: Sitecore.Support.419438.config
      • For Sitecore XP 8.0 Initial release or higher:
    1) Download the Sitecore.Support.131964.dll assembly to the \bin folder.
    2) Download the Sitecore.Support.131964.config to the \App_Config\Include folder.
  3. Rebuild the sitecore_master_index.
  4. For Sitecore XP 8.0 Initial Release or higher:
    Download and install the patch compatible with the affected product version found on this page: https://github.com/SitecoreSupport/Sitecore.Support.156916/releases.

Solution 3 (Applicable For Sitecore XP 8.1 Update-3 And XP 8.2)

  1. Download the Sitecore.Support.131964.dll assembly to the \bin folder.
  2. Download the Sitecore.Support.131964.config file to the \App_Config\Include folder.
  3. Download and apply the appropriate patch available on this page:
    https://github.com/SitecoreSupport/Sitecore.Support.156916/releases.

Solution 4 (Applicable For Sitecore XP 9.0)

This solution loads locked items via a lightweight direct SQL query that is backed by an SQL filtered index leading to unlimited scalability and no performance drops with a growing volume of content.

  1. Download the Sitecore.Support.156916.dll to the \bin folder.
  2. Download the Sitecore.Support.156916.config file to the \App_Config\Include folder.
  3. Introduce the SQL-filtered index for the Sitecore Master database:
    CREATE NONCLUSTERED INDEX IX_Versioned_Locks_Filtered
        ON VersionedFields (itemID)
    INCLUDE (Value,language,version)
        WHERE FieldId='{001DD393-96C5-490B-924A-B0F25CD9EFD8}' -- this is lock fieldID
  4. Navigate to the \Website\sitecore\shell\Applications\WebEdit\Dialogs\LockedItems folder and change the x:inherits attribute in the LockedItems.xaml.xml file as follows:
    <Sitecore.Shell.Applications.WebEdit.Dialogs.LockedItems x:inherits="Sitecore.Support.Shell.Applications.WebEdit.Dialogs.LockedItems.LockedItemsPage,Sitecore.Support.156916">

Solution 5 (Workaround For Sitecore XP 9.1)

In the /App_Config/Sitecore/Experience Editor/Sitecore.ExperienceEditor.config file, set the value of WebEdit.ShowNumberOfLockedItemsOnButton setting to false:

<setting name="WebEdit.ShowNumberOfLockedItemsOnButton" value="false" />