Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1875

Generating new ObjectId() takes between 15 - 45 secs

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.13.2
    • Component/s: API
    • None
    • Environment:
      Windows 7, Eclipse Luna 4.4.2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I am experimenting a bug with generating new ObjectId in my project.
      The first invocation takes about 15 - 45 secs, but then (posterior invocations works as usual) everything is ok.
      This happens only when I anchor my laptop to my smartphone to access Internet!

      Seems like NetworkInterface.getNetworkInterfaces() takes too much time to retrieve network information for the first time
      ObjectId.class
      579 Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();

      here is my code:
      long init = System.currentTimeMillis();
      new ObjectId();
      LOG.info("ObjectId generated in " + (System.currentTimeMillis() - init) + " ms");

      Please fix it

            Assignee:
            Unassigned Unassigned
            Reporter:
            v.nazarov@indizen.com Valijon
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: