[
https://issues.apache.org/jira/browse/CXF-8020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16816276#comment-16816276
]
Andriy Redko commented on CXF-8020:
-----------------------------------
Hi, thanks for reporting the issue, please notice that this is just a sample,
thank you.
> 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)