...
This page documents our suggested best practices for using powerful Reporting macros and some common mistakes to avoid.
Suggested best practices
Table of Contents | ||
---|---|---|
|
Avoid using nested reports
While writing reports it is always a good idea to utilize single-layer reports rather than multi-layer (nested) reports because it is easier to execute and has better performance due to its their simplicity.
Pop quiz
...
Which of the following two reports
...
is a better option for getting the titles of grandchildren pages?
...
Answer
...
The answer is option A because it is simple and it does not use nested reporter macros.
Avoid using the @all
and @global
parameters in Content Reporter
Using the @all
and @global
parameters for the Content Reporter macro is not encouraged for large Confluence instances because it will query all contents created on all spaces. This will inevitably cause huge performance issues.
As such, using the SPACE KEY
(Any other space key may be specified explicitly) parameter or the @self
(The space the current content is in) the parameter can be used for faster reporting results.
Always keep the Match All Criteria parameter checked in Content Reporter
...
On the other hand, if it is unchecked (set to False) then it will attempt to report any of the parameter values. Doing so in large Confluence instances will cause huge performance issues due to Content Reporter's attempt to report large results.
...
Use Sort macros to have sorted results
Reporting doesn't sort results by default unless you use the page:sorted children
or page:sorted descendents/descendants
keys from the Page Supplier.
You may not be able to use those keys all the time therefore if you desire sorted results, a good practice would be to always add a Sort macro (Boolean Sort, Natural Sort, Number Sort, Date Date Sort, and Text Sort) within one of the Reporter macros (Combining Reporter, Content Reporter, Expanding Reporter, Grouping Reporter, Local Reporter, Space Reporter, User Group Reporter, and User Reporter).
Use filters in nested reporter macros when using Combining Reporter for more efficient queries
If you need to filter results from the Combining Reporter macro, it is best to apply filters on each of the nested reporter macros rather than having a filter on the Combining Reporter macro.
Scaling up users with the User Reporter macro
The User Reporter macro is a powerful tool that can be used to retrieve and report on Confluence users based on their space permissions, user groups, or usernames. However, as the number of users in the Confluence instance increases and as more external user directories are connected, broad usage of the macro with no filters will increasingly tax the instance’s resources. Here are some general best practice guidelines to get the best performance out of a User Reporter report:
...