[All Adaptavist Apps]

Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Performance Tuning in Theme Builder 2.x

(warning) under construction

Resource Servlet Caching

Issue: Menu takes up to 20 seconds to load, graphical macros seem slow
Affects: Clients using Confluence 2.1.0 - 2.1.5a

Prior to Confluence 2.2, there is an issue with the "Resources Servlet" in Confluence that results in images (such as menu icons) being re-loaded each time you visit a new page.

The servlet is a core part of Confluence that allows files that are stored within plugins to be accessed by the web browser. Because the servlet did not provide sufficient information to the web browser, files were not getting cached and were therefore loaded far more often than required.

Adaptavist identified this issue and raised a bug report with Atlassian.

From Confluence 2.2 onwards, our recommended alterations have become part of Confluence which will massively improve performance of the servlet for a wide range of plugins.

Users of Builder 2.0 should should review our Caching Overview.

Solution

The easiest solution is to upgrade to Confluence 2.2 or above and Theme Builder 2.x or above.

If you are using Confluence 2.1.x, it is possible to manually apply a patch if you have access to a friendly Java developer - for more information, please see our Conditional GET patch instructions.

Workaround

If you are unable to apply the patch of upgrade Confluence, an alternative is to upgrade to Builder version 1.6 or above which has a feature to turn off icons in the view and edit menus.

View/Edit Menu Icons

Issue: Menus take up to 4 seconds to load in Firefox web browser
Affects: Visitors to your site who use the Firefox web browser

There are numerous icons on the view and edit menus which can cause delays in theme rendering over slow connections, particularly on the Firefox web browser.

Adaptavist have identified further issues with the Resource servlet in Confluence which, at present, have not been resolved.

Users of Builder 2.0 should review our Menu Performance Tuning tutorial.

Workaround

Prior to a patch being available for Confluence, you can upgrade to Builder 1.6 or above which has an option to load the menu as quickly as possible.

Pages with Images

Issue: Pages with lots of images take longer to load
Affects: Users on slow connections; Internet Explorer users.

If you put lots of images on a page you increase the amount of information the end-user has to download so that's going to make the page load slower regardless which web browser is being used.

Solution

Reduce the number of images on the page, or make them smaller. Consider using the gallery macro which displays thumbnails of the images or use the thumbnail parameter when adding images to pages.

If a page seems to load a lot more slowly in Internet Explorer than other browsers, consider disabling PNG support as that will reduce the amount of work the browser has to do.

Slow Automated Menus

Issue: Automated menus, created with macros, can sometimes be slow
Affects: Clients using macros that output huge amounts of data

Some of our menu tutorials show various examples of automating menu contents by using macros such as the children macro, toc macro and incoming-links macro. When used correctly, these enable you to have your menus automatically adapt to changes in your content.

However, some macros can generate huge amounts of information. We ran in to this problem here in our user guide where we used to generate the Macros menu as follows:

* [Macros] {children:page=Macros|all=true}

As we added more and more macro sections and tutorials, the "Macros" menu became huge and started to make page rendering in our user guide slower and slower.

Users of Builder 2.0 should review our Menu Performance Tuning tutorial.

Solution

The most obvious solution is to limit the size of the menus generated with macros. Smaller menus will be faster.

To limit the depth (number of levels) of the menu, use the "depth" parameter:

{children:page=Macros|depth=1}

To limit the number of items returned at the top level of the results, use the "first" parameter:

{children:page=Macros|first=10}

You may need to use alternate methods depending on the macros you are using, the examples shown above are just tricks that worked for us.

Remember: The bigger your menus get (number of items), the slower they get.

Workaround

If you have no choice other than to have huge menus, you can upgrade to Builder 1.6 or above which has an option to load the menu as quickly as possible - although this will not reduce the amount of data the browser receives, it allows massive menus (even with 10,000+ items) to display much more quickly.

Workaround

If caching can't be used (depending on the types of macro you are using in your footer), try using alternate macros or restrict use of macros in the footer of highly-used spaces.

  • No labels