original-brownbear commented on code in PR #13472:
URL: https://github.com/apache/lucene/pull/13472#discussion_r1642984190


##########
lucene/core/src/java/org/apache/lucene/search/TaskExecutor.java:
##########
@@ -112,15 +102,10 @@ RunnableFuture<T> createTask(Callable<T> callable) {
           () -> {
             if (startedOrCancelled.compareAndSet(false, true)) {
               try {
-                Integer counter = numberOfRunningTasksInCurrentThread.get();

Review Comment:
   I think the number of tasks is a non-issue in practice, we create all the 
future/runnable objects anyway so all we can save here is the nodes/tasks in 
the executor queue which should be trivial.
   We could massively reduce the number of tasks if we knew the parallelism the 
executor runs at and just create that many tasks at a time. We could look into 
that in a follow-up?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to