Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-43191

Children Display Macro slow due to poor permission check performance

XMLWordPrintable

      Resolution requires the faster permissions service

      To resolve this issue you will need to enable the faster permissions service on your site.

      If you've previously applied system properties to limit how many pages the children display macro can display as a workaround, you can remove these properties once you've enabled the faster permissions service.

      1 - Summary

      We need to improve the performance of permission checks in Confluence. The Children Display Macro is heavily affected by this issue. Currently, admin users are not affected by this issue.

      2 - Steps to reproduce:
      1. Install a Confluence 5.10.
      2. Create a space.
      3. Create around 3000 pages with the following command, replacing the "< >" tags:
        for ((i=1;i<=3000;i++)) ; do  curl -v -u admin:admin -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d'{"type":"page","ancestors":[{"type":"page","id":<pageId>}],"title":'$i',"space":{"key":"<space_key>"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' "<confluence-url>/rest/api/content/?os_authType=basic";  done
        
      4. In the same space, add the Children Display Macro. Use the default configuration for the macro.
      5. As an admin user, reload the page. Takes around 2-3s to load.
      6. Login as a non-admin user and browse the same page that contains the children display macro. Takes around 100s to load.
      3 - Workaround
      • It is best to avoid using the Children Display Macro in parent pages that have many child pages OR
      • You can specify the Parent Page, Number of Children, and Depth of Descendants to be displayed for better performance. You can tune it for smaller numbers.
        • Forced limit for "descendants depth" parameter to avoid rendering macros with an unlimited amount of descendants layers.
          CATALINA_OPTS="-Dconfluence.child-macro.max-depth=4 ${CATALINA_OPTS}"
          
        • Limit the number of children shown by the macro
          CATALINA_OPTS="-Dconfluence.child-macro.page-limit=4 ${CATALINA_OPTS}"
          
      4 - Side Notes

              glipatov George Lipatov
              ajardim Artur J
              Votes:
              50 Vote for this issue
              Watchers:
              83 Start watching this issue

                Created:
                Updated:
                Resolved: