You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2015/07/28 08:26:04 UTC

[jira] [Updated] (SPARK-9399) Assorted micro-optimizations in PythonRDD

     [ https://issues.apache.org/jira/browse/SPARK-9399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Josh Rosen updated SPARK-9399:
------------------------------
    Description: 
There are a few minor optimizations in PythonRDD which may avoid garbage creation or Scala overheads:

- Replace a foreach() loop with a while() loop.
- Returns nulls instead of Options to avoid calling `Option.apply()` and `Option.isDefined` once per read() call.
- Call .size() instead of .length(), thereby avoiding an implicit Java -> Scala collections conversion.

  was:
There are a few minor optimizations in PythonRDD which may avoid garbage creation or Scala overheads:

- Replace a foreach() loop with a while() loop.
- Returns nulls instead of Options to avoid allocating an Option once per read() call.
- Call .size() instead of .length(), thereby avoiding an implicit Java -> Scala collections conversion.


> Assorted micro-optimizations in PythonRDD
> -----------------------------------------
>
>                 Key: SPARK-9399
>                 URL: https://issues.apache.org/jira/browse/SPARK-9399
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>            Reporter: Josh Rosen
>            Assignee: Josh Rosen
>            Priority: Minor
>
> There are a few minor optimizations in PythonRDD which may avoid garbage creation or Scala overheads:
> - Replace a foreach() loop with a while() loop.
> - Returns nulls instead of Options to avoid calling `Option.apply()` and `Option.isDefined` once per read() call.
> - Call .size() instead of .length(), thereby avoiding an implicit Java -> Scala collections conversion.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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