You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2016/01/31 00:22:39 UTC
[jira] [Resolved] (SPARK-13100) improving the performance of
stringToDate method in DateTimeUtils.scala
[ https://issues.apache.org/jira/browse/SPARK-13100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reynold Xin resolved SPARK-13100.
---------------------------------
Resolution: Fixed
Assignee: Yang Wang
Fix Version/s: 2.0.0
> improving the performance of stringToDate method in DateTimeUtils.scala
> -----------------------------------------------------------------------
>
> Key: SPARK-13100
> URL: https://issues.apache.org/jira/browse/SPARK-13100
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.5.2, 1.6.0
> Reporter: Yang Wang
> Assignee: Yang Wang
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: screenshot-1.png
>
>
> In the stringToDate method in DateTimeUtils.scala, in order to create a Calendar instance we create a brand new TimeZone instance every time by calling TimeZone.getTimeZone("GMT"). In jdk1.7, however, this method is synchronized, thus such an approach can cause significant performance loss. Since the same time zone is used each time we call that method, I think we should create a val in the DateTimeUtils singleton object to hold that TimeZone, and use it every time.
--
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