[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

No Format

* [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:

No Format

{children:page=Macros|depth=1}

...

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

No Format

{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

...

See Also

Many of the performance tuning tips from Theme Builder 1.x still apply to Theme Builder 2.x: