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

Investigate removing recursion from serialize and deserialize functions

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

      Use Case

      As a javascript power user
      I want to avoid recursion
      So that I avoid the cost of adding a call stack to each layer of bson parsing

      User Impact

      • Potentially a performance increase

      Dependencies

      • None

      Unknowns

      • How much needs to change to support iteration?

      Acceptance Criteria

      Implementation Requirements

      • Use a stack structure (array, push/pop) to maintain deserialize or serialize context
      • Add and remove from stack where recursive calls begin and end

      Testing Requirements

      • All existing BSON tests should pass
      • Check 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: