Tweaked madvise for index to be faster
This commit is contained in:
parent
dc963d3e44
commit
6894121859
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user