Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/860#discussion_r13317607
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -1015,8 +1015,26 @@ private[spark] class BlockManager(
           bytes: ByteBuffer,
           serializer: Serializer = defaultSerializer): Iterator[Any] = {
         bytes.rewind()
    -    val stream = wrapForCompression(blockId, new 
ByteBufferInputStream(bytes, true))
    -    serializer.newInstance().deserializeStream(stream).asIterator
    +
    +    def doWork() = {
    --- End diff --
    
    Does `lazy val` has performance overhead? I agree `lazy val` can make the 
code clearer here,   but `dataDeserialize` can be called many times if there 
are lots of shuffle blocks. I'm not a scala expert, please correct me if I am 
wrong. 


---
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.
---

Reply via email to