Slow page loading times can result when opening the "Recently Worked on" page.
- MySQL 5.7
This problem occurs while opening the "Recently Worked on" page.
Page loads within a reasonable amount of time
The page loading is slow taking up to 14 seconds
Aside from the slowness observed in the UI, this problem has the following symptoms:
- If a HAR file is captured while loading the page, the following URL call will take quite a bit of time to complete:
- If SQL debugging is enabled, the following method call will take the longest to complete while processing the above URL:
- If thread dumps are taken while loading the page, most threads will reference calls to com.atlassian.confluence.core.DefaultContentEntityManager.getVersionsLastEditedByUser.
- While the actual SQL queries execute quickly, most of the processing is taken up within the Hibernate layer.
The following Java method was found to be inefficient as it is supposed to retrieve all pages (including drafts) that a specified user edited in the past, but only the latest versions of these documents:
However, it retrieves all versions of these pages and ends up discarding the majority of the returned records which is most likely causing the delay in rendering the results.
A possible workaround would be to disable the recently-viewed-plugin altogether to prevent these queries from being executed. If this is acceptable, then it's the only way to reduce the load time until proper fix is implemented. Please also see the work around listed in CONFSERVER-57457 as this appears to be related.