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

    https://github.com/apache/spark/pull/9373#discussion_r43578480
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/util/FileBasedWriteAheadLog.scala
 ---
    @@ -126,11 +127,11 @@ private[streaming] class FileBasedWriteAheadLog(
         val logFilesToRead = pastLogs.map{ _.path} ++ currentLogPath
         logInfo("Reading from the logs: " + logFilesToRead.mkString("\n"))
     
    -    logFilesToRead.iterator.map { file =>
    +    logFilesToRead.par.map { file =>
    --- End diff --
    
    This is an expensive operation - you'd end up running an O(n) operation to 
create a copy (in addition to the copy cost). Do we really need this? I am not 
entirely sure the copying adds a whole lot of value, considering that this 
array is not going to be very huge. Also note the additional cost to spin up 
threads (if the context does not already have them spun up). 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to