-
Bug
-
Resolution: Fixed
-
Low
-
4.1.2
-
Jira enterprise standalone 4.1.2
mysql 5.1.150
Apache tomcat 6.0.20
-
4.01
-
Please please please change CommentClauseQueryFactory.generateIssueIdFromCommentQuery() to use a DocumentHitCollector rather than a for() loop that iterates over Hits.
We're still working on upgrading our Jira 3.13 to 4.1.2.
One thing I noticed was that comment queries were taking forever on my test server when compared to 3.13 running on the same server.
After a day of debugging and testing, I narrowed it down to looping through the Hits in CommentClauseQueryFactory.generateIssueIdFromCommentQuery().
The Hits class is deprecated and states,
/** * Iterating over all hits is generally not desirable and may be the source of * performance issues. If you need to iterate over many or all hits, consider * using the search method that takes a {@link HitCollector}. */
I modified our Jira to use a com.atlassian.jira.issue.statistics.util.DocumentHitCollector instead of a for() loop over Hits and our comment queries are now miraculously 6 to 8 times faster.
Here are the statistics for one of my tests before and after the change. For this test I ran comment ~ power which returns about 7000 issues. In Jira 3 I ran the equivalent by putting 'power' into the query box and checking only 'Comments'.
- Before the change
- In Luke, the Lucene query took 3.5 seconds (and without the level restrictions it took 389 ms, which one should consider for another Improvement....)
- In Jira, the Lucene query took the same amount time
- Looping through the issue id's took 74 seconds
- After the change
- Lucene query with hit collection takes 12s
- is related to
-
JRASERVER-22453 Regression: Comment searching causes too many clauses error
- Closed
- relates to
-
JRASERVER-22256 Performance Issue with JQL functions
- Closed