-
Suggestion
-
Resolution: Fixed
-
6
-
5
-
Problem Definition
Current method com.atlassian.jira.issue.IssueManager#getIssueCountForProject might have performance overhead for large Jira installations due to slow SQL.
In some cases it's not necessary to count a number of issues, you just need to check is the project is not empty.
Additional comments:
- This method is executed as part of board-scope-filter which is executed quite often, see
JSWSERVER-16185; - Example of SQL requests, note 2 requests per page load when viewing an issue:
2018-06-11 12:55:58,804 http-nio-8081-exec-19 admin 775x382x1 hj63dl /browse/AG-13 3ms "SELECT COUNT(I.ID) FROM public.jiraissue I WHERE I.PROJECT='10300'" 2018-06-11 12:56:00,716 http-nio-8081-exec-16 admin 776x449x3 hj63dl /rest/projects/1.0/project/AG/lastVisited 1ms "SELECT COUNT(I.ID) FROM public.jiraissue I WHERE I.PROJECT='10300'"
- In case of large jiraissue table this SQL might take more than 1s to execute;
Suggested Solution
Create additional method atLeastOneIssueExists(Long projectId) similar to com.atlassian.jira.issue.IssueManager#atLeastOneIssueExists
It should have performance enhancement, since it will not count the issues as it's currently done in getIssueCountForProject.
After all, we are only executing it on board-scope-filter to check if the project is not empty.
Workaround
None
- relates to
-
JSWSERVER-16185 board-scope-filter executed too many time which leads to performance overhead
- Closed
-
JSWSERVER-19230 REST call lastVisited executes board-scope-filter which leads to performance overhead
- Closed
-
PSR-90 Loading...
- is related to
-
FLASH-792 Loading...