Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1527

Speed up encoding and decoding of binary BSON CStrings

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.3
    • 2.2.1
    • BSON
    • None

    Description

      The current implementation of encoding and decoding of binary BSON CStrings takes two passes.

      1. When encoding, one pass to encode and a second to verify that the resulting CString has no null bytes
      2. When decoding, one pass to find the terminating null byte and a second to decode the UTF8 bytes

      Both directions can be sped up by writing a custom UTF8 encoder that uses a single pass.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            robert@mongodb.com Robert Stam
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: