You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2023/03/15 13:35:32 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #40440: [SPARK-42808][CORE] Avoid getting availableProcessors every time in `MapOutputTrackerMaster#getStatistics`

LuciferYang commented on code in PR #40440:
URL: https://github.com/apache/spark/pull/40440#discussion_r1137081654


##########
core/src/main/scala/org/apache/spark/MapOutputTracker.scala:
##########
@@ -697,6 +697,8 @@ private[spark] class MapOutputTrackerMaster(
     pool
   }
 
+  private val availableProcessors = Runtime.getRuntime.availableProcessors()

Review Comment:
   1. How much time can be saved?
   2. There are 10+places in Spark that use `Runtime.getRuntime.availableProcessors()`. Is it possible to expand the scope of benefits?



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org