Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5936

Investigate using array instead of set for serialization circular reference detection

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON, Performance
    • Labels:
    • Not Needed

      Use Case

      As a clever javascript engineer
      I want to use the most performant data structure for the job
      So that I can make BSON serialization faster

      In small use cases JS arrays can be faster than Sets, would BSON serialization's path be faster as an array even for depths of 100 or more?

      User Impact

      • Serialization performance

      Dependencies

      • None

      Unknowns

      • Set vs Array performance, can we dynamically switch if one is faster for a certain use case?

      Acceptance Criteria

      Implementation Requirements

      • Benchmark changing "path" to an array in serialize

      Testing Requirements

      • Existing circular reference tests should still pass
      • Check nested serialize benchmarks

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: