Question
How do i change the ContentFinder's refresh interval?
Answer, Resolution
By default, the ContentFinder automatically refreshes its search results every 20 seconds to check for new items. This refresh one cause of performance slowdown especially when there are long running ContentFinder requests displayed in the logs.
The refresh interval can be defined by overlaying and modifying the script in /libs/cq/ui/widgets/source/widgets/wcm/ContentFinderTab.js
.
Disabling the ContentFinder's refresh interval
CQ5.2.1
- Install attached package (cfRefreshInterval.zip) which will apply the patch described above
CQ 5.3+
In CQ 5.3+, you can:
- Open
/crxde
(CRXDE Lite) web application and login as admin - Copy to
/libs/cq/ui/widgets/source/constants.js to /apps/cq/ui/widgets/source/
(if the folder structure doesn't exist under /apps then create it first, save, then copy constants.js) - Change the value of
CQ.CF_REFRESH_INTERVAL
constant to 0
Or
- Install the attached constants.zip package that includes this overlay with the
CQ.CF_REFRESH_INTERVAL
set to 0.
Disable initial Content Finder Search
The Content Finder also does an asset search automatically when the user clicks on a content finder tab and on each page load. If you find that the results of the auto searches are not actually useful for authors or you are willing to part with this functionality for a performance boost then you should disable this search. Note: The process below works for CQ5.3 and CQ5.2.1.
To disable the initial search that is done by the Content Finder when clicking a tab or loading a page, do the following:
- Using CRX Explorer or CRXDE Lite, copy
/libs/cq/ui/widgets/source/widgets/wcm/ContentFinderTab.js to /apps/cq/ui/widgets/source/widgets/wcm/
(if the folder structure doesn't exist under /apps then create it first, save, then copy ContentFinderTab.js) - In the CRX repository Modify the copied file as follows; comment out
this.loadStore(this.getParams())
in the show event handler of the contentfinder - Save the modified file back to the CRX repository
/apps/cq/widgets/source/widgets/wcm/ContentFinderTab.js
CQ.wcm.ContentFinderTab.getResultsBoxConfig = function(config, proxyConfig, storeConfig, refreshInterval) { // MOD START: disable refreshing refreshInterval = "0"; // MOD END: disable refreshing
/apps/cq/widgets/source/widgets/wcm/ContentFinderTab.js
constructor: function(config) { config = CQ.Util.applyDefaults(config, { "layout": "border", // "title": config.title ? config.title : "", "items": [], "listeners": { "show": function() { //this.loadStore(this.getParams()); } } }); CQ.wcm.ContentFinderTab.superclass.constructor.call(this, config); },
Disable the Content Finder Search Suggestions
When a user starts typing a path in the Content Finder search box it provides suggestions to the user. In a CQ5 instance with a large amount of content this feature causes slowdown in system performance.
To disable this feature, do the following:
- Locate all content finder extension scripts in the CRX repository (you can use Webdav, CRX Explorer, or CRXDE Lite if using 5.3+). These scripts can be found under the following paths:
/apps/wcm/extensions/contentfinder/*.js
/apps/<app-name>/extensions/contentfinder/*.js - Using CRXDE Lite, copy all js files (that do not already exist) from /libs/wcm/extensions/contentfinder/ to /apps/wcm/extensions/contentfinder/. If /apps/wcm/extensions/contentfinder/ directory does not exist then create it and copy all files from /libs/wcm/extensions/contentfinder.
- Modify all scripts under the two /apps directories mentioned in step 1 as follows; replace the SuggestionFieldBox url with an empty string like this:
CQ.wcm.ContentFinderTab.getQueryBoxConfig({
"id": "cfTab-Pages-QueryBox",
"items": [
CQ.wcm.ContentFinderTab.getSuggestFieldConfig({"url": ""})
]
}),
Note: In step 3, you must replace the text, do not comment the line because it will not work.
Applies to
CQ5.2.1 / CQ >= 5.3
Download
Download