Improve performance
This commit is contained in:
parent
fd4f8e77d6
commit
9fc58eae2b
@ -42,7 +42,10 @@ public class LLLocalKeyPrefixReactiveRocksIterator {
|
||||
return Flux
|
||||
.generate(() -> {
|
||||
var readOptions = new ReadOptions(this.readOptions);
|
||||
readOptions.setFillCache(range.hasMin() && range.hasMax());
|
||||
if (!range.hasMin() || !range.hasMax()) {
|
||||
readOptions.setReadaheadSize(2 * 1024 * 1024);
|
||||
readOptions.setFillCache(false);
|
||||
}
|
||||
Slice sliceMin;
|
||||
Slice sliceMax;
|
||||
if (range.hasMin()) {
|
||||
|
@ -82,7 +82,7 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
|
||||
if (lowMemory) {
|
||||
this.dbScheduler = lowMemorySupplier.get();
|
||||
} else {
|
||||
this.dbScheduler = Schedulers.newBoundedElastic(Runtime.getRuntime().availableProcessors(),
|
||||
this.dbScheduler = Schedulers.newBoundedElastic(Schedulers.DEFAULT_BOUNDED_ELASTIC_SIZE,
|
||||
Schedulers.DEFAULT_BOUNDED_ELASTIC_QUEUESIZE,
|
||||
"db-" + name,
|
||||
60,
|
||||
|
@ -37,7 +37,10 @@ public abstract class LLLocalReactiveRocksIterator<T> {
|
||||
return Flux
|
||||
.generate(() -> {
|
||||
var readOptions = new ReadOptions(this.readOptions);
|
||||
readOptions.setFillCache(range.hasMin() && range.hasMax());
|
||||
if (!range.hasMin() || !range.hasMax()) {
|
||||
readOptions.setReadaheadSize(2 * 1024 * 1024);
|
||||
readOptions.setFillCache(false);
|
||||
}
|
||||
Slice sliceMin;
|
||||
Slice sliceMax;
|
||||
if (range.hasMin()) {
|
||||
|
Loading…
Reference in New Issue
Block a user