From 694eed79eff2668092c3060ec01a72753fd3c1c1 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Thu, 12 Dec 2024 15:32:31 +0100 Subject: [PATCH] (index) Increase thread limit and optimize search result handling Updated the default "index.valuationThreads" to 16 for improved concurrency. Expanded buffer sizes and restructured result handling logic for better memory management and performance. --- code/index/java/nu/marginalia/index/IndexGrpcService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/index/java/nu/marginalia/index/IndexGrpcService.java b/code/index/java/nu/marginalia/index/IndexGrpcService.java index c834a4a2..9ebf7d17 100644 --- a/code/index/java/nu/marginalia/index/IndexGrpcService.java +++ b/code/index/java/nu/marginalia/index/IndexGrpcService.java @@ -34,7 +34,6 @@ import org.slf4j.LoggerFactory; import org.slf4j.Marker; import org.slf4j.MarkerFactory; -import java.sql.SQLException; import java.util.BitSet; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; @@ -184,7 +183,7 @@ public class IndexGrpcService } // accessible for tests - public List executeSearch(SearchParameters params) throws SQLException, InterruptedException { + public List executeSearch(SearchParameters params) throws Exception { if (!statefulIndex.isLoaded()) { // Short-circuit if the index is not loaded, as we trivially know that there can be no results