Skip to content

Commit 4675b21

Browse files
committed
Add comment.
1 parent 622951f commit 4675b21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/scala/org/apache/spark/executor/TaskMetrics.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ class TaskMetrics private[spark] () extends Serializable {
203203

204204
import InternalAccumulator._
205205
@transient private[spark] lazy val nameToAccums = {
206+
// The construction of this map is a performance hotspot in the JobProgressListener, so we
207+
// optimize this by using a pre-sized Java hashmap; see SPARK-20776 for more details.
206208
val mapEntries = Array[(String, AccumulatorV2[_, _])](
207209
EXECUTOR_DESERIALIZE_TIME -> _executorDeserializeTime,
208210
EXECUTOR_DESERIALIZE_CPU_TIME -> _executorDeserializeCpuTime,

0 commit comments

Comments
 (0)