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

Stop using DBObject.keySet when decoding

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.2
    • Affects Version/s: 3.0.0
    • Component/s: Performance
    • None

      DBObject#keySet is inefficient for instances of BasicBSONList. But currently decoding into DBObject relies on the keySet method to determine if a DBObject should be replaced with a DBRef. This reliance is unnecessary in the case of a BasicBSONList and should be removed.

      In general, there is little reason for an application to enumerate the keys of a BSON array.

      Original Description

      Please compare the StringRangeSet implementations in the mongo-java-driver 2.x and 3.x and consider throwing out the 3.x version and replace it with 2.x.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            rkapsi@squarespace.com Roger Kapsi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: