Lazily cache ObjectId hex string by default

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • 2
    • None
    • Not Needed
    • 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

      Use Case

      As a bson user,
      I want hex string caching to be enabled by default,
      So that I do not need to opt-into a potential performance optimization.

      Unknowns

      • n/a

      Dependencies

      • n/a

      Acceptance Criteria

      Implementation Requirements

      • Enable cacheHexString by default
      • Ensure the cached hex string is lazily populated (instantiating an object id with a non-string constructor argument should not construct a hex string to cache).
      • Ensure deep equality of object ids is unaffected (this is already true).
      • Remove the hex string cache WeakMap in favor of JS private properties

      Documentation Requirements

      • n/a

      Follow Up Requirements

      • N/A

            Assignee:
            Bailey Pearson
            Reporter:
            Aditi Khare (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: