Optimizing Publish Performance
- Last Modified:
- 28 Sep 2020
- User Level:
The time it takes for a Channel to publish can increase over time. Below are some tips to help you identify the causes of increased publish durations as well as fine-tune publish performance.
Publish reports provide granular detail about each Channel's publish performance. You can configure the level of reporting for each Channel in the Channel settings, under 'Publish options. You can also configure how long publish reports are kept in the Performance & Logging configuration.
When you download the report statistics in a .CSV file, you can open it in a spreadsheet application like Microsoft Excel.
To know the length of time that each object adds to the publish time you can create a column that multiplies the "Count" value by the "Average" value. Sort the data by this value to see which objects contribute the most time to the publish, and then fine-tune those objects to try to reduce their time. Most often, the items that add the most time are Navigation Objects and Brokers.
Often, the easiest way to reduce a publish time is to tweak Navigation Objects; especially those Navigation Objects that are used on a large number of pages on the Channel.
Cache Navigation Objects
For Top Content, Top Stories, Related Content and Keyword Search Content objects make sure to enable the "Cache output" option. This option was added in 8.1.6 and enabling it can greatly reduce the publish time for that object.
Be more specific with Navigation Object searches
Some Navigation Objects can be configured to find Content Items that meet specific criteria in the Branch of a site. You can avoid unnecessary recursive searches by ensuring that the Root Section you specify in the Navigation Object is as far down the Site Structure hierarchy as possible. For example, don't point the Navigation Object to the Home Section, when you know that all the relevant Content Item is within Home > News.
Cache Content Type Elements
It's possible to cache information about the elements within a Content Type that are used for ordering or selecting Content Items. Some of the Navigation Objects this applies to are Top Content, Keyword Search Content and Mapped metadata (for mapped meta keywords).
Adding the elements which are used within these objects can improve preview and publish performance on pages using those Navigation Objects. To configure the Cache go to Administration > Cache Management, click on the Configuration tab and follow the instructions on how to cache Content Type Elements.
Keyword Search Content Navigation Object
For any Keyword Search Content Navigation Object the options: Allow Matching on sub-items?, Allow matching of Composite Keywords?, and Narrow keyword selection when possible? demand more processing by the Navigation Object and can impact on publish times. Ensure that these options are only enabled if they are necessary.
Long publish times on Brokers that connect to external sources (for example the Web Object, Data Object, or Import URL) may indicate a slow connection to the data source, or a large volume of data being processed. Your network infrastructure team may be able to improve access speeds for connections to sources within their control.
In addition, Web Objects can be configured to cache their output, saving a copy of the content locally, and only retrieving updates from the source based on a custom cache expiry duration for that object.
Large volumes of Media publishing can slow down a publish, particularly if they are publishing for each Channel publish.
Automatic Media Publish
Channels that have been configured to automatically publish Media Items (like Publish Now and Publish Branch) can result in a large volume of Media Items being published. It's recommended that automatic media publish is not used unless it is necessary. To check whether this is enabled, go to Administration > Set up Sites & Channels > Channels and Edit the Channel. In the Publish Options accordion, check the Media Publish Options option.
If you do want to auto publish Media Items then consider using the Auto Publish functionality available on Media Categories. This will still automatically publish Media Items, but can be restricted to specific Categories.
In the Preview & Publish Settings, check that the Only write changed files is enabled. This will ensure that only Media Items that have changed since the last publish will publish.
Media vs File/Image Elements
Depending on your database and your network architecture, publishing Content Items with Media Elements can be significantly quicker than publishing Content Items with Image and File elements. If there are large numbers of Image and File elements, and the Content Item is taking a long time to publish, consider using a Media Element instead.
A simple solution to a slow publish can also be to reduce the number of pages that are published each time the Channel is published.
If there are areas of the site that aren't updated often or ever (for example the News pages from 2015), those Sections can be set as Archive Sections. To do this, edit the Section, and enable the Archive Section option.
By default, Archive Sections are not published when a site is published, unless the Advanced option is used to Publish Archive Sections. This is available on both a manual publish and a scheduled publish.
It may be a good idea to set a frequent scheduled publish that does not publish Archive Sections, and a daily publish (run during the night) that does include Archive Sections.
Only Publish Changed Pages
Similar to the option to Only Publish Changed files, in the Preview & Publish Settings, when enabled, the Only write changed pages setting will ensure that only pages that have changed since the last publish will publish.
This setting is not limited to pages where only Content Items have changed; the changes could also include updates to the Header or Footer in the Page Layouts, Content Layouts, or content that is displayed via Navigation Objects, etc
Fulltext Publish Restriction
If you have a large amount of fulltext content that doesn't change frequently, configure the Fulltext publish period and Fulltext publish period unit, in the Preview & Publish Settings, for the amount of time between fulltext content publishes.
Since Programmable Layouts execute during publish, they can impact publish performance. Always evaluate the publish times using the Publish Reports both before and after the Programmable Layout is added to ensure that it is not had a negative impact on the publish time.
The publish time for individual Content Items or Sections may highlight Content Types (and therefore Programmable Layouts) that require some performance improvements. Using the caching features available within the API is important. When executing the same script multiple times it is possible to add the information to the publish cache. Both techniques will have a positive impact on performance. Refer to our Programmable Layouts Best Practice for further advice.
Configuring the Number of publish threads, Number of file writing threads, and Set file IO block size correctly can fine-tune the publish speed. These are configured in the Preview & Publish Settings. Further information on setting the number of publish threads and file writing threads and about determining the setting for the file IO block size is available.
Check that all the related software is up to date and meets the recommended requirements.
If any of the following are on separate servers, then test the speed and reliability of the connections between those servers:
- Database: The Terminalfour database
- Channel Output Directory: The output directory that is configured on the Channel. Some clients have found that the write speed to a non-local disk has caused a slow down in publish speed. Check the location of your Output Directory for the Channel.
- File Store: The File Store is configured in the Advanced Configuration
- Terminalfour application: The location of the Terminalfour Application war file
Slow or unreliable connections will have an impact on the publish speed.
Chat with our Support Team about getting a Health Check on your server, to pinpoint server-specific cases that may impact on publish performance.Back to top