bd2019us created CAMEL-13414:
--------------------------------
Summary: Date.getTime() can be changed to
System.currentTimeMillis()
Key: CAMEL-13414
URL: https://issues.apache.org/jira/browse/CAMEL-13414
Project: Camel
Issue Type: Bug
Environment: 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.
Reporter: bd2019us
components/camel-docker/src/main/java/org/apache/camel/component/docker/consumer/DockerEventsConsumer.java
57
components/camel-mail/src/main/java/org/apache/camel/component/mail/NowSearchTerm.java
54
components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java
57
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)