YdbSpliterator uses ArrayBlockingQueue<>(1) which produce overhead on threads synchronisation. This decision was made based on the desire to minimize memory usage, but it could be too slow.
We have to know numbers. We need to make a performance test on 1kk amount of data with:
current spliterator
spliterator with ArrayBlockingQueue<>(N) where N in [100, 1000, 10000]
spliterator with non-blocking queue or something which could work better by time
If current ArrayBlockingQueue(1) implementation turns out to be too slow in many practical applications, then the buffer size could be made adjustable in ReadTableParams :-)
YdbSpliterator uses ArrayBlockingQueue<>(1) which produce overhead on threads synchronisation. This decision was made based on the desire to minimize memory usage, but it could be too slow.
We have to know numbers. We need to make a performance test on 1kk amount of data with: