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

Stop using DBObject.keySet when decoding

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.2.2
    • Component/s: Performance
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: