(minor performance) Reduce GC churn in index
This commit is contained in:
parent
cd12f49fc0
commit
028b5a4f0d
@ -159,8 +159,11 @@ public class IndexQueryService {
|
||||
* <br>
|
||||
* Then the results are combined.
|
||||
* */
|
||||
private final ThreadLocal<TLongArrayList> resultsArrayListPool = ThreadLocal.withInitial(TLongArrayList::new);
|
||||
private TLongList evaluateSubqueries(SearchParameters params) {
|
||||
final TLongArrayList results = new TLongArrayList(params.fetchSize);
|
||||
final TLongArrayList results = resultsArrayListPool.get();
|
||||
results.resetQuick();
|
||||
results.ensureCapacity(params.fetchSize);
|
||||
|
||||
// These queries are various term combinations
|
||||
for (var subquery : params.subqueries) {
|
||||
|
Loading…
Reference in New Issue
Block a user