Displaying Confluence Macro-Forge-App results in a Page-Property-Report-Macro takes too long during calculation

Hi all,

recently we have investigated a problem with a Confluence Macro Forge App and the Page Property Report Macro. When there are a lot of Pages included on the reporting Page it takes a lot of time until the entire Report will be displayed.

In details we developed a small Forge App for displaying some Informations about the current release-version of a confluence Page. This works very well for a small amount of issues in a Page Property Report, but the display-time increases linearly with every page that is added to the report.

We suspect, the Forge app is obviously executed completely for each page and is not cached. Depending on the status, 1-2 RestCalls are called. These are “expensive” in terms of time but unavoidable. I have added a delay (sleep using timeout function) before a rest call. The time for building the PageProperty report correlates linearly with the delay. With 11 documents and a delay of 5s, the report structure even runs into an error. Presumably a timeout for the report macro. Release version …

The entire Forge-App now seems useless for our customer since he needs to display a lot of pages in the Report.

My questions:
Is there any way to improve the display time? Maybe during a caching mechanism or anything like that? Another workaround i thought about would be to write some results of the Forge-calculations to a Page Property. But i guess the Page Proprty Report will not take care about that “custom” property.

Best Regards
Gunther