You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/12 13:15:00 UTC

[jira] [Work logged] (CXF-8020) new Date.getTime() can be changed to System.currentTimeMillis()

     [ https://issues.apache.org/jira/browse/CXF-8020?focusedWorklogId=226647&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-226647 ]

ASF GitHub Bot logged work on CXF-8020:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Apr/19 13:14
            Start Date: 12/Apr/19 13:14
    Worklog Time Spent: 10m 
      Work Description: bd2019us commented on pull request #541: CXF-8020 use System.currentTimeMillis()
URL: https://github.com/apache/cxf/pull/541
 
 
   new Date() is just a thin wrapper around System.currentTimeMillis(). Using System.currentTimeMillis() can help speed up the system
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 226647)
            Time Spent: 10m
    Remaining Estimate: 0h

> new Date.getTime() can be changed to System.currentTimeMillis()
> ---------------------------------------------------------------
>
>                 Key: CXF-8020
>                 URL: https://issues.apache.org/jira/browse/CXF-8020
>             Project: CXF
>          Issue Type: Bug
>            Reporter: bd2019us
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Location: distribution/src/main/release/samples/jax_rs/sse_spring/src/main/java/demo/jaxrs/sse/StatsRestServiceImpl.java:82
> 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)