[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Performance Tuning in Theme Builder 3.x

Theme Builder is now used on some extremely large and popular wikis - both behind corporate firewalls, on the public Internet and even the world's largest privately owned hospital ship! As your wiki becomes more widely adopted, things that used to work quickly may start to become bottlenecks and your configuration of Theme Builder is no exception.

...

Whilst most performance tuning will be specific to the way you are using Theme Builder, there are certain elements that we can deal with within the theme itself.

Building on the existing Theme Builder 2.x performance tweaks, we've built in even more enhancements:

  • The average theme design now only uses 5 external JavaScript files instead of 11
  • More resources are using Cache Expire (1 year)
  • Theme layouts contain much more intelligent caching on the server to reduce processing time
  • The default View and Edit menus are 3 times faster thanks to compound items
  • We've waded through the HTML, JavaScript and CSS with all manner of diagnostic tools and made huge numbers of improvements throughout the plugin
  • We've refactored huge swathes of the Java code used in the plugin to make it cleaner, faster and more maintainable

...

However, you probably wouldn't be adding macros to the layout if there wasn't a need for them. So what can you do to solve this dilemma? Well, there are a number of solutions...

Use the cache macro

The cache macro allows you to cache the output of a macro. On subsequent views of the same page, if a cache is found then it's used instead of reprocessing the macro (or other wiki notation encapsulated by the cache macro).

But be careful - if you've got macros that output different things based on user privileges, you could end up caching the output for one user and then showing it to everyone else. For a much more detailed explanation with examples, see Menu Performance Tuning.

Only show when required

There are numerous macros that can show and hide content only when it's needed based on factors such as location within the wiki, labels, user privileges, etc.

...

Use compound menu items

If you use the menuitem macro, menulink macro and menuicon macro a lot, try converting your markup to use the new compound-menuitem macro which can reduce the number of macros used by two thirds (from 3 to 1)!

...

The default menu notation output by the viewmenu macro and editmenu macro has been updated in Theme Builder 3.0 and above, however if you've altered the notation or moved links out in to other locations, etc., you should certainly consider converting your notation over to the new compound format.

Likewise, if you've imported a theme designed in an earlier version of Theme Builder, it'll be using the old menu notation that used a lot more macros.

See Also: View Menu 3.x and Edit Menu 3.x

Avoid CSS imports

In earlier versions of Theme Builder, it was difficult to have one master CSS file that would be used across multiple spaces so many of our clients created a css file and imported it in to the Custom CSS using the CSS @import directive.

...

There are a range of macros that take advantage of widely used technology such as HTML (see html macro and html-include macro) and XSLT (see xslt macro), etc.

These generally require that you understand the syntax of whatever technology they offer, but require far less processing time on the server.

...

If you host or access the database and/or file system on another server using something like NAS, you'll likely be adding a huge amount of latency, compared to local storage, as a result. Instead of using remote file storage, look at pushing the attachments into the database and taking manual backups – this will substantially reduce the amount of size needed for the Confluence home directory (potentially multiple TB reduced to under a 100 MB).

If your wiki has become mission critical and you need expert advice, check out our Dedicated Hosting, Remote Hosting and Confluence Support solutions.

If you are just looking for some free quick-fire advice in the form of specific questions, which we can read, process and reply within 10 minutes; then we are more than happy to help. Just raise a question in General Support on our Tracking System.

Let us prove to you how useful our support services can be!

See Also

Most of the content of earlier performance tutorials are still applicable to Theme Builder 3.x: