diff --git a/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/index/service/index/SearchIndex.java b/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/index/service/index/SearchIndex.java index 222c332e..17e62437 100644 --- a/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/index/service/index/SearchIndex.java +++ b/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/index/service/index/SearchIndex.java @@ -53,8 +53,11 @@ public class SearchIndex implements AutoCloseable { var h = reader.getHeader(offset); int length = (int) (h.dataOffsetLongs() - h.indexOffsetLongs()); + urls.adviceRange(NativeIO.Advice.Normal, offset, 512); + if (length > 0) { urls.adviceRange(NativeIO.Advice.WillNeed, h.indexOffsetLongs(), length); + urls.adviceRange(NativeIO.Advice.Normal, h.dataOffsetLongs(), 2048); urls.pokeRange(h.indexOffsetLongs(), length); } }); diff --git a/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/search/EdgeSearchService.java b/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/search/EdgeSearchService.java index a486e63d..329322a2 100644 --- a/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/search/EdgeSearchService.java +++ b/marginalia_nu/src/main/java/nu/marginalia/wmsa/edge/search/EdgeSearchService.java @@ -8,7 +8,6 @@ import com.google.inject.name.Named; import lombok.SneakyThrows; import nu.marginalia.wmsa.api.model.ApiSearchResult; import nu.marginalia.wmsa.api.model.ApiSearchResults; -import nu.marginalia.wmsa.client.exception.TimeoutException; import nu.marginalia.wmsa.configuration.server.Context; import nu.marginalia.wmsa.configuration.server.Initialization; import nu.marginalia.wmsa.configuration.server.MetricsServer;