QueryResult.getRows() returning very slowly
I'm doing a very simple query to find tags that match a given search term:
ex) select * from [cq:Tag] as item where contains(*,'queryTerm') and isdescendantnode(item, '/etc/tags/TagNamespace')
I am not using QueryBuilder. I'm using the JCR Query API directly. The query is executing very quickly never taking more than 44ms. However, when I try to retrieve the results from the query with QueryResult.getRows() or QueryResult.getNodes() my application consistently hangs for anywhere from 10,000 - 20,000 ms. Even more odd, I see these same slow times when there are no query results.
I'm seeing this on AEM 6.0.
Any thoughts would be most appreciated.