You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/09/01 09:46:31 UTC
[jira] Commented: (HARMONY-1358) [classlib][sql] Improve the
performance of java.sql.Time.valueOf(String ) method
[ http://issues.apache.org/jira/browse/HARMONY-1358?page=comments#action_12432085 ]
Paulex Yang commented on HARMONY-1358:
--------------------------------------
Richard, any micro-benchmark data to show the difference before and after the modification?
> [classlib][sql] Improve the performance of java.sql.Time.valueOf(String ) method
> --------------------------------------------------------------------------------
>
> Key: HARMONY-1358
> URL: http://issues.apache.org/jira/browse/HARMONY-1358
> Project: Harmony
> Issue Type: Improvement
> Components: Classlib
> Reporter: Richard Liang
> Assigned To: Paulex Yang
> Priority: Minor
> Attachments: Harmony-1358.diff
>
>
> Hello,
> In this method, we first try to separate the string into three parts and validate each part of the string,then pass the validated whole string to a SimpleDateFormat object which do the real parsing job.It seems likely that the validating work and the parsing work are duplicate. And each time to invoke the java.sql.Time.valueOf() method, we need to get a new instance of SimpleDateFormat,this is inefficient because constructing a new SimpleDateFormat is costly.
> Best regards,
> Richard
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira