Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6101

Date.getTime() can be changed to System.currentTimeMillis()

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None

      Description

      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.

        Attachments

        1. 1.patch
          0.8 kB
          bd2019us

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                bd2019us bd2019us
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: