Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-61391

Upon loading any project for the first time, JIRA caches all components from all projects




      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.


      After JIRA is started up or its cache is cleared, loading a project will execute a findAll() method to cache all components that exist in the instance. In large installations, this causes the loading of projects for the first time to take a long time (easily more than 30 seconds).

      Expected Behavior

      While caching all components should reduce processing in subsequent project loads, it causes a bad experience in cold caching.

      We should be caching components in a per-project basis.

      Actual Behavior

      JIRA builds a cache of all components for all projects upon the loading of any project. This causes severe slowness in cold cache situations.

      The below stack can be seen in thread dumps, if took at the time any project is being loaded for the first time after JIRA's startup.

      at com.atlassian.jira.bc.project.component.CachingProjectComponentStore.findAll(CachingProjectComponentStore.java:280)
      	at com.atlassian.jira.bc.project.component.CachingProjectComponentStore.findByComponentNameCaseInSensitive(CachingProjectComponentStore.java:145)
      	at com.atlassian.jira.bc.project.component.DefaultProjectComponentManager.findByComponentNameCaseInSensitive(DefaultProjectComponentManager.java:364)
      	at com.atlassian.jira.jql.resolver.ComponentResolver.getIdsFromName(ComponentResolver.java:28)

      Steps to Reproduce

      • Create a large number of components, around 3000 should be enough;
      • Restart JIRA;
      • Upon startup, load any project in the instance. Notice the time it takes for the page to load and compare it with subsequent loads of any other project;


      At this point, there is no known workaround for this. However, the slowness is only noticed at the first time any issue update happens, until a restart of JIRA.


        Issue Links



              Unassigned Unassigned
              jpalharini Joao Palharini (Inactive)
              2 Vote for this issue
              9 Start watching this issue