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

Improve bson serialization by avoiding redundant array copies

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • Java Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      The BasicOutputBuffer inherits several suboptimal methods from OutputBuffer. Namely, toByteArray() copies the buffer once into a ByteArrayOutputStream and then again into a byte array. Similarly, ObjectIDs can be written to byteBuffers without an intermediate buffer. 

            Assignee:
            evan.darke@mongodb.com Evan Darke
            Reporter:
            evan.darke@mongodb.com Evan Darke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None