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

Speed up encoding and decoding of binary BSON CStrings

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.3
    • Affects Version/s: 2.2.1
    • Component/s: BSON
    • None

      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.

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

              Created:
              Updated:
              Resolved: