jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OAK-8233) new Date.getTime() can be changed to System.currentTimeMillis() to improve performance
Date Mon, 15 Apr 2019 08:09:00 GMT

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

Marcel Reutegger updated OAK-8233:
----------------------------------
      Priority: Minor  (was: Major)
    Issue Type: Improvement  (was: Bug)

> new Date.getTime() can be changed to System.currentTimeMillis() to improve performance
> --------------------------------------------------------------------------------------
>
>                 Key: OAK-8233
>                 URL: https://issues.apache.org/jira/browse/OAK-8233
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: bd2019us
>            Priority: Minor
>         Attachments: 1.patch
>
>
> Hello,
> I found that System.currentTimeMillis() can be used here 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)

Mime
View raw message