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:
parent
e7dd28b926
commit
647d38007f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user