Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-268

Store bson_oid_t in ObjectId rather than creating one each time we need it

    XMLWordPrintable

    Details

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

      Description

      Currently, ObjectId stores its data as a String. When we need to interact with libmongoc, we use this to initialize a bson_oid_t. 

      this is rather costly and there is no clear reason why we aren't just keeping around and reusing one bson_oid_t the whole time.

      we should do that instead, and expose the String version of the ObjectID, along with the timestamp, as computed properties.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: