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).
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.
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.
- 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.