mridulm commented on code in PR #43366:
URL: https://github.com/apache/spark/pull/43366#discussion_r1362069554


##########
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala:
##########
@@ -624,7 +627,13 @@ private[spark] class TaskSchedulerImpl(
         }
 
         if (!launchedAnyTask) {
-          taskSet.getCompletelyExcludedTaskIfAny(hostToExecutors).foreach { 
taskIndex =>
+
+          val hostToExecutorsForTaskSet = hostToExecutors.map { case (host, 
execsOnHost) =>

Review Comment:
   We are generating this map each time there are no tasks scheduled ... for 
larger clusters, this can go into thousands of entries in the map.
   Instead, why not maintain this map directly ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to