• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.15.3, 7.4.8, 7.9.3
    • Content - History
    • None

      Issue Summary

      Slow page loading times can result when opening the "Recently Worked on" page.

      Environment

      • 6.15.3
      • MySQL 5.7

      Steps to Reproduce

      This problem occurs while opening the "Recently Worked on" page.

      Expected Results

      Page loads within a reasonable amount of time

      Actual Results

      The page loading is slow taking up to 14 seconds

      Symptoms

      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:
        <confluence-base-url>/rest/api/content/search?expand=container,metadata.currentuser.lastcontributed,metadata.currentuser.lastmodified
      • If SQL debugging is enabled, the following method call will take the longest to complete while processing the above URL:
        ContentEntityManager.getVersionsLastEditedByUser()
        
      • 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.

      Analysis

      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:

      com.atlassian.confluence.internal.persistence.hibernate.AbstractContentEntityObjectHibernateDao#getVersionsLastEditedByUserNew
      

      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.

      Workaround

      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.

       

      Please be aware that disabling the recently-viewed-plugin will cause also the plugins dependent on it to be disabled. This may not be acceptable if these plugins are required. Below an example of the effect of disabling the plugin on v8.5:

      To disable plugins '[com.atlassian.confluence.plugins.recently-viewed-plugin]', we need to first disable all dependent enabled plugins: 
      [com.atlassian.confluence.plugins.confluence-nav-links(MANDATORY), 
      com.atlassian.confluence.plugins.confluence-onboarding(MANDATORY), 
      com.atlassian.mywork.mywork-confluence-provider-plugin(MANDATORY), 
      com.atlassian.business.insights.core-plugin(OPTIONAL), 
      com.atlassian.confluence.plugins.confluence-graphql-providers(MANDATORY),
      com.atlassian.confluence.plugins.confluence-dashboard(MANDATORY),
      com.atlassian.confluence.plugins.confluence-business-blueprints(MANDATORY),
      com.atlassian.confluence.plugins.atlassian-playbook-blueprints(MANDATORY), 
      com.atlassian.plugins.confluence-project-creation(MANDATORY), 
      com.atlassian.confluence.plugins.confluence-software-project(MANDATORY),
      com.atlassian.confluence.plugins.confluence-questions(OPTIONAL), 
      com.atlassian.confluence.plugins.confluence-retention-rules(OPTIONAL),             com.atlassian.confluence.plugins.confluence-software-blueprints(MANDATORY),
      com.atlassian.confluence.plugins.confluence-space-blueprints(MANDATORY), com.atlassian.confluence.plugins.confluence-knowledge-base(MANDATORY),
      com.atlassian.confluence.plugins.confluence-jira-content(MANDATORY), com.atlassian.confluence.plugins.confluence-auditing-coverage(OPTIONAL),
      com.atlassian.confluence.plugins.confluence-roadmap-plugin(MANDATORY),
      com.atlassian.confluence.plugins.confluence-webhooks(OPTIONAL), 
      confluence.extra.jira(MANDATORY), 
      com.atlassian.business.insights.confluence-plugin(OPTIONAL), 
      com.atlassian.confluence.plugins.confluence-mobile-plugin(MANDATORY),
      com.addonengine.analytics(OPTIONAL), 
      com.atlassian.confluence.plugins.confluence-inline-tasks(MANDATORY), 
      com.atlassian.confluence.plugin.copyspace(MANDATORY), 
      com.atlassian.confluence.plugins.confluence-create-content-plugin(MANDATORY), 
      com.atlassian.confluence.plugins.confluence-space-ia(MANDATORY)] 

            [CONFSERVER-58601] "Recently Worked on" page loads slowly

              Unassigned Unassigned
              sshaw@atlassian.com Steve Shaw
              Affected customers:
              27 This affects my team
              Watchers:
              32 Start watching this issue

                Created:
                Updated: