spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-15742) Reduce collections allocations in Catalyst tree transformation methods
Date Fri, 03 Jun 2016 00:07:59 GMT

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

Apache Spark reassigned SPARK-15742:
------------------------------------

    Assignee: Josh Rosen  (was: Apache Spark)

> Reduce collections allocations in Catalyst tree transformation methods
> ----------------------------------------------------------------------
>
>                 Key: SPARK-15742
>                 URL: https://issues.apache.org/jira/browse/SPARK-15742
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Josh Rosen
>            Assignee: Josh Rosen
>
> In Catalyst's TreeNode {{transform}} methods we end up calling {{productIterator.map(...).toArray()}}
in a number of places, which is slightly inefficient because it needs to allocate and grow
ArrayBuilders. Since we already know the size of the final output ({{productArity}}), we can
simply allocate an array up-front and use a while loop to consume the iterator and populate
the array.
> For most workloads, this performance difference is negligible but it does make a measurable
difference in optimizer performance for queries that operate over very wide schemas (thousands
of columns).



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


Mime
View raw message