Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1481#discussion_r15737608
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/BlockObjectWriter.scala ---
    @@ -111,7 +93,12 @@ private[spark] class DiskBlockObjectWriter(
       private val initialPosition = file.length()
       private var finalPosition: Long = -1
       private var initialized = false
    -  private var _timeWriting = 0L
    +
    +  /** Calling channel.position() to update the write metrics can be a 
little bit expensive, so we
    +    * only call it every N writes */
    +  private val WRITES_BETWEEN_METRICS_UPDATES = 20
    --- End diff --
    
    I would make this 32 so the modulo will be cheap


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to