[
https://issues.apache.org/jira/browse/KARAF-6235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16816992#comment-16816992
]
ASF subversion and git services commented on KARAF-6235:
--------------------------------------------------------
Commit a00a032a7fafa3c3d8cbd9dd338a1c1432df4a81 in karaf's branch
refs/heads/master from Jean-Baptiste Onofré
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=a00a032 ]
Merge pull request #810 from bd2019us/KARAF-6235
[KARAF-6235] Use System.currentTimeMillis()
> Date.getTime() can be changed to System.currentTimeMillis()
> -----------------------------------------------------------
>
> Key: KARAF-6235
> URL: https://issues.apache.org/jira/browse/KARAF-6235
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Reporter: bd2019us
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 4.3.0, 4.2.5
>
> Attachments: 1.patch
>
>
> Hello,
> I found that System.currentTimeMillis() can be used instead of new
> Date.getTime().
> Since new Date() is a thin wrapper of light method
> System.currentTimeMillis(). The performance will be greatly damaged if it is
> invoked too much times.
> According to my local testing at the same environment,
> System.currentTimeMillis() can achieve a speedup to 5 times (435 ms vs 2073
> ms), when these two methods are invoked 5,000,000 times.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)