Reduce queue polling time in ProcessingIterator

Updated ProcessingIterator's queue polling from one second to 50 milliseconds for improved performance. This facilitates faster document processing across more cores, reducing bottlenecks and slow single-threaded processing.
This commit is contained in:
Viktor Lofgren 2023-12-29 14:27:58 +01:00
parent e7dd28b926
commit 647d38007f

View File

@ -75,7 +75,7 @@ public class ProcessingIterator<T> implements Iterator<T> {
return true;
do {
next = queue.poll(1, TimeUnit.SECONDS);
next = queue.poll(50, TimeUnit.MILLISECONDS);
if (next != null) {
return true;
}