- 
    Bug 
- 
    Resolution: Cannot Reproduce
- 
    Highest 
- 
    None
- 
    6.4.5, 7.2.1, 7.2.10, 7.4.1, 7.9.2, 7.12.1, 8.5.5, 8.20.10, 9.1.0
- 
        6.04
- 
        132
- 
        Severity 2 - Major
- 
        117
- 
        
- 
        
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
Performing some testing with JIRA 6.4.5, I've noticed that there is a huge difference when logging work on an issue with no history and on an issue with a long history.
I enabled Profiling on JIRA to check the difference:
Example 1: Issue with 858 entries on history:
2015-10-21 15:18:53,596 http-bio-8080-exec-21 DEBUG sysadmin 918x163x1 1zsbpp 0:0:0:0:0:0:0:1 /secure/CreateWorklog.jspa [atlassian.util.profiling.UtilTimerStack] [6104ms] - /secure/CreateWorklog.jspa [0ms] - PermissionManager.hasPermission() [6100ms] - CreateWorklog.execute() [1ms] - PermissionManager.hasPermission() [1ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [44ms] - IssueIndexManager.reIndexIssueObjects() [1ms] - PermissionManager.hasPermission() [11ms] - IssueIndexManager.reIndexWorklogs()
Example 2: Issue with 4 entries on history:
2015-10-21 15:21:44,662 http-bio-8080-exec-24 DEBUG sysadmin 921x169x1 1zsbpp 0:0:0:0:0:0:0:1 /secure/CreateWorklog.jspa [atlassian.util.profiling.UtilTimerStack] [189ms] - /secure/CreateWorklog.jspa [0ms] - PermissionManager.hasPermission() [186ms] - CreateWorklog.execute() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [0ms] - PermissionManager.hasPermission() [37ms] - IssueIndexManager.reIndexIssueObjects() [0ms] - PermissionManager.hasPermission() [9ms] - IssueIndexManager.reIndexWorklogs() [1ms] - PermissionManager.getProjects()
Notes
It further degrade the performance of the instance and it takes longer to load issues with large history items
- SQL to identify issues with large worklog history:
select issueid, count(id) from worklog group by issueid having count(id) > 100 order by (count(id)) desc; - With join
select concat(p.pkey,'-',i.issuenum) as issue, count(a.id) from worklog a, jiraissue i, project p where i.project = p.id and i.id = a.issueid group by p.pkey,i.issuenum having count(a.id) > 100 order by count (a.id) DESC; 
 
- With join
- SQL to find large number of jiraaction (comments ... ) per issue:
select a.issueid, count(a.id) from jiraaction a group by a.issueid order by count (a.id) DESC; - With join
select concat(p.pkey,'-',i.issuenum) as issue, count(a.id) from jiraaction a, jiraissue i, project p where i.project = p.id and i.id = a.issueid group by p.pkey,i.issuenum order by count (a.id) DESC; 
 
- With join
Workaround
Clone the problematic issues with long history and use the cloned issues to log work
- is related to
- 
                    JRASERVER-67699 Time Tracking Report with a Large Project can Cause High Memory Pressure -         
- Closed
 
-         
- 
                    ACE-4652 Loading... 
- 
                    ACE-6118 Loading... 
- 
                    ACE-6154 Loading... 
- relates to
- 
                    JRASERVER-73874 Reindexing issues with large number of comments, worklogs, history overloads indexers -         
- Closed
 
-         
- 
                    JRASERVER-60107 A large change history or worklog on an issue can cause an OOME when displaying the History tab -         
- Closed
 
-         
- 
                    JRASERVER-65961 Cannot delete a project if tied with an issue with more than 2000 comments on MSSQL -         
- Closed
 
-         
- 
                    JRACLOUD-65082 Adding worklogs to issues with large histories is very slow -         
- Closed
 
-         
- 
                    JRASERVER-66251 Reindexing large number of issues with a lot of change history can cause an OOME -         
- Closed
 
-         
- 
                    JRACLOUD-45903 Bad performance noticed on issues with long history - Closed
 
- 
                    JRASERVER-64001 Limit results in work log tab - Closed
 
- 
                    HOT-38335 Loading... 
- causes
- 
                    CST-14102 Loading... 
- has action
- 
                    RM-11290 Loading... 
- is cloned by
- 
                    COM-1052 Loading... 
- Mentioned in
- mentioned in
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 
- 
                    Page Loading... 

