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

Paginate the list of attachments in the attachments macro for file lists

      With the file list blueprint, the attachment macro is seeing much greater use. When there are a large number of files, the performance of the page is poor.

      If we paginated the results, we should have much better performance.

      NB: Customers have reported that this issue is compounded in IE. It performs better in Firefox.

            [CONFSERVER-29918] Paginate the list of attachments in the attachments macro for file lists

            What will be a solution around thaT?

            Gonchik Tsymzhitov added a comment - What will be a solution around thaT?

            This is apparently causing huge performance issues for us. We're considering disabling the attachment macro and asking our users to use the Bob Swift Attachment Table macro instead.

            Jesse Wagner added a comment - This is apparently causing huge performance issues for us. We're considering disabling the attachment macro and asking our users to use the Bob Swift Attachment Table macro instead.

            It's in the attachments plugin, which in 5.2.5 is located at atlassian-confluence-5.2.5\confluence\WEB-INF\atlassian-bundled-plugins\confluence-attachments-plugin-3.6.7.jar. Within that jar file it's in templates\extra\attachments\attachments-table.vm. If you search for "$attachmentPreview" and comment out the lines that use it, that will disable the preview.

            As always, be sure to back up the original jar file first, and test it on a non-production server first.

            Gareth White added a comment - It's in the attachments plugin, which in 5.2.5 is located at atlassian-confluence-5.2.5\confluence\WEB-INF\atlassian-bundled-plugins\confluence-attachments-plugin-3.6.7.jar. Within that jar file it's in templates\extra\attachments\attachments-table.vm. If you search for "$attachmentPreview" and comment out the lines that use it, that will disable the preview. As always, be sure to back up the original jar file first, and test it on a non-production server first.

            Gareth where is the Velocity template located?

            Davin Studer added a comment - Gareth where is the Velocity template located?

            I am also seeing this behaviour in Confluence 5.2.5. I believe the problem is due to the way the attachments macro shows a preview of some file types. For example, if you have many PDFs attached to the same page, it will try to generate a preview of every one when you browse to the page. This causes excessive CPU usage in both the browser and on the Confluence server.

            Paginating it may help, but I would prefer it if it did not automatically try to generate the preview until you actually expanded one of the attachments. Alternatively, add a way to disable the automatic preview - either globally or for each usage of the macro.

            For now I'm working around the issue by customising the Velocity template used by the attachments macro so that the preview is not generated.

            Gareth White added a comment - I am also seeing this behaviour in Confluence 5.2.5. I believe the problem is due to the way the attachments macro shows a preview of some file types. For example, if you have many PDFs attached to the same page, it will try to generate a preview of every one when you browse to the page. This causes excessive CPU usage in both the browser and on the Confluence server. Paginating it may help, but I would prefer it if it did not automatically try to generate the preview until you actually expanded one of the attachments. Alternatively, add a way to disable the automatic preview - either globally or for each usage of the macro. For now I'm working around the issue by customising the Velocity template used by the attachments macro so that the preview is not generated.

            I can confirm this. Back in Confluence 3.5 we had a user attach 560 Files to a page. Now in Confluence 5.1 this page is almost inaccessible.

            Stefan Ernst added a comment - I can confirm this. Back in Confluence 3.5 we had a user attach 560 Files to a page. Now in Confluence 5.1 this page is almost inaccessible.

              Unassigned Unassigned
              nbhawnani Niraj Bhawnani
              Affected customers:
              12 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated: