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

RSS Feeds: Do not render computationally intensive macros in RSS Feeds due to frequent rendering to RSS Readers

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 3.2
    • None
    • 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.

      When an RSS Feed is requested, Confluence renders all pages into the resulting XML.

      This can be computationally intensive for certain macros, especially the SQL Macro.

      If people are subscribed to wide-ranging feeds such as 'New Pages' or 'Changed Pages', this can cause many such pages to render. Many of these rendering passes are for no benefit to humans, since RSS Readers refresh feeds on a regular basis, especially Google Reader which refreshes every 30 minutes even if nobody is currently using Google Reader!

      Further, the feeds cannot be cached because they are dependent upon each individual user's security privileges.

      The result: Goole Reader refreshes the feed 48 times a day, causing computationally intesive pages to render for no human benefit, and it does this for every separate user who has subscribed. Other RSS Readers update less frequently, but still annoyingly.

      Recommendation: Do not render the SQL macro in RSS Feeds. There may also be other macros that are best avoided. (Perhaps a flag in the plugin that indicates whether to render in RSS Feeds?)

      It is especially the case on Atlassian's own Extranet that this causes high load.

          Form Name

            [CONFSERVER-18180] RSS Feeds: Do not render computationally intensive macros in RSS Feeds due to frequent rendering to RSS Readers

            To use this undocumented feature, create a Bandana entry in the global context with key "blacklistedRssMacros" whose value is a list of macro commands that are blacklisted for RSS.

            Niraj Bhawnani added a comment - To use this undocumented feature, create a Bandana entry in the global context with key "blacklistedRssMacros" whose value is a list of macro commands that are blacklisted for RSS.

            Joe Clark added a comment -

            Changes to address this problem were committed and shipped in 3.2 without review . Does this issue still require further improvement? Please re-open if so.

            Joe Clark added a comment - Changes to address this problem were committed and shipped in 3.2 without review . Does this issue still require further improvement? Please re-open if so.

            Matt Ryall added a comment - - edited

            The simplest way to implement this is checking the render mode inside the macro and changing the output.

            Note that we've had issues raised in the past when certain macros didn't render in some circumstances (CONF-4655, CONF-8222), so this should probably not be the default behaviour, but rather an admin feature that can be configured if required.

            Update: a better approach would be to execute macro rendering asynchronously with a limit on how long it can execute for. This wouldn't stop memory usage problems due to the SQL macro (in truth, nothing really can), but it would help with thread or CPU usage problems.

            Matt Ryall added a comment - - edited The simplest way to implement this is checking the render mode inside the macro and changing the output. Note that we've had issues raised in the past when certain macros didn't render in some circumstances ( CONF-4655 , CONF-8222 ), so this should probably not be the default behaviour, but rather an admin feature that can be configured if required. Update : a better approach would be to execute macro rendering asynchronously with a limit on how long it can execute for. This wouldn't stop memory usage problems due to the SQL macro (in truth, nothing really can), but it would help with thread or CPU usage problems.

            What about chart macros that use the sql macro for data ?

            David Cheney (Inactive) added a comment - What about chart macros that use the sql macro for data ?

              Unassigned Unassigned
              jrotenstein JohnA
              Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: