Yang Wang created SPARK-13100:
---------------------------------

             Summary: 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.6.0, 1.5.2
            Reporter: Yang Wang


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to