From f4eeef145e5c5d157e13ce21e2feff28096d825f Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Tue, 17 Sep 2024 15:20:41 +0200 Subject: [PATCH] (index) Reduce fetch size to improve timeout characteristics --- code/index/java/nu/marginalia/index/IndexGrpcService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/index/java/nu/marginalia/index/IndexGrpcService.java b/code/index/java/nu/marginalia/index/IndexGrpcService.java index e1614166..81172a5b 100644 --- a/code/index/java/nu/marginalia/index/IndexGrpcService.java +++ b/code/index/java/nu/marginalia/index/IndexGrpcService.java @@ -336,10 +336,10 @@ public class IndexGrpcService extends IndexApiGrpc.IndexApiImplBase { } private void executeSearch() { - final LongArrayList results = new LongArrayList(512); + final LongArrayList results = new LongArrayList(64); // These queries are different indices for one subquery - final LongQueryBuffer buffer = new LongQueryBuffer(512); + final LongQueryBuffer buffer = new LongQueryBuffer(64); while (query.hasMore() && budget.hasTimeLeft()) { @@ -350,7 +350,7 @@ public class IndexGrpcService extends IndexApiGrpc.IndexApiImplBase { results.add(buffer.data.get(i)); } - if (results.size() >= 512) { + if (results.size() >= 64) { enqueueResults(new CombinedDocIdList(results)); results.clear(); }