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

Performance improvements for /admin/viewgeneralconfig.action

    XMLWordPrintable

Details

    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      I've found a couple of quick-win performance improvements that can be made to the General Configuration page in Confluence's admin console.

      • GeneralConfigurationAction.getSiteHomePages is invoked on view operations, even though it's only needed on edit. This appears to be laziness on the part of webwork. Easy optimisation.
      • GeneralConfigurationAction.getSiteHomePages performs at least 1, sometimes 2 individual permission checks on every single global space in the system. On systems with lots of spaces, this quickly fails to scale. The purpose of the permission check is to ensure that the Administrator is not able to set the site home page to a page that is not accessible to all users. This is a computationally expensive operation for small benefit. We could drastically improve the performance (with a slight usability cost) by changing the permission checking to occur 'on-save' rather than 'on-load', reducing the complexity of the operation from O(n) to O(1).
      • GeneralConfigurationAction.doDefault makes multiple calls to settingsManager.getGlobalSettings which involves a call to the BandanaManager each time. It should just retrieve the global settings once for the duration of the request.

      Patch

      There is a patch available for Confluence 3.5.13 > 3.5.17. Please be aware that this is not tested and you use it at your own risk. The preferred fix for this issue is to upgrade to Confluence 4.1 or above.

      Download the attached file (CSP-68093-2.zip) and extract it into your Confluence's WEB-INF/classes directory, ensuring to preserve the folder paths in the zip file. At this point your WEB-INF/classes directory should contain this (in addition to what was there already):

      /WEB-INF
        /classes
          /com
            /atlassian
              /confluence
                /admin
                  /actions
                    GeneralConfigurationAction.class
                    GeneralConfigurationAction-validation.xml

      You'll need to restart Confluence in order to pick up these changes, at which point your troubles will hopefully be gone!

      NB: This means it is now possible for an Administrator to accidentally set the site home page to a page that is not viewable by all users.

      Attachments

        Issue Links

          Activity

            People

              jclark@atlassian.com Joe Clark
              jclark@atlassian.com Joe Clark
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: