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:
- Sitecore Query
The operation is executed on a Sitecore application level, causing all items to be loaded into the process memory and have business rules applied (such as access control). The more content that is in the system, the longer it takes to process it initially. Subsequent requests are executed faster, thanks to a warm caching layer.
- Sitecore Fast Query
The operation is translated into a direct SQL statement, and it bypasses certain Sitecore logic and has better performance than Sitecore Query. The more content that is in the system, the longer it takes to execute the translated SQL query because it operates through the general-purpose Fields view. Subsequent requests do not take full advantage of the Sitecore caching layer because the logic is run on a database level.
- Content Search
Indexing strategies refresh the index periodically, leaving the possibility of showing obsolete data. A covered index must exist to contain all the content in the database, which might violate the Item Buckets concept of one index per bucket.
Summary
Each approach provided by Sitecore architecture has its own benefits and drawbacks.
- Download the Sitecore.Support.419438.dll assembly to the \bin folder.
- 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 />"
- 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
- 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.
- Rebuild the sitecore_master_index.
- 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.
- Download the Sitecore.Support.131964.dll assembly to the \bin folder.
- Download the Sitecore.Support.131964.config file to the \App_Config\Include folder.
- Download and apply the appropriate patch available on this page:
https://github.com/SitecoreSupport/Sitecore.Support.156916/releases.
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.
- Download the Sitecore.Support.156916.dll to the \bin folder.
- Download the Sitecore.Support.156916.config file to the \App_Config\Include folder.
- 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
- 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">
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" />