GitHub user JoshRosen opened a pull request:

    https://github.com/apache/spark/pull/7719

    [SPARK-9399] Minor performance optimizations in PythonRDD

    This patch implements three trivial performance optimizations in PythonRDD:
    
    - Replace a .`foreach()` call with a while() loop.
    - Returns nulls instead of Options to avoid allocating a new Option once 
per read() call.
    - Call `.size()` instead of `.length()`, thereby avoiding an implicit Java 
-> Scala collections conversion.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JoshRosen/spark pyspark-read-optimization

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/7719.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #7719
    
----
commit 13f7e2f65fc23f0bd5fcbb3a5f449479138f37c5
Author: Josh Rosen <[email protected]>
Date:   2015-07-28T06:19:20Z

    Minor optimizations in PythonRDD

----


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