You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hunter Logan (Jira)" <ji...@apache.org> on 2020/07/29 15:45:00 UTC
[jira] [Assigned] (HIVE-21611) Date.getTime() can be changed to
System.currentTimeMillis()
[ https://issues.apache.org/jira/browse/HIVE-21611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hunter Logan reassigned HIVE-21611:
-----------------------------------
Assignee: Hunter Logan
> Date.getTime() can be changed to System.currentTimeMillis()
> -----------------------------------------------------------
>
> Key: HIVE-21611
> URL: https://issues.apache.org/jira/browse/HIVE-21611
> Project: Hive
> Issue Type: Bug
> Reporter: bd2019us
> Assignee: Hunter Logan
> Priority: Major
> Labels: pull-request-available
> Attachments: 1.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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
(v8.3.4#803005)