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
    • 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: