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

Remove wasteful empty Buffer allocations in `Connection`

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.0
    • Affects Version/s: None
    • Component/s: Core
    • Labels:
      None

      Our logic to read data off the wire does a whole bunch of Buffer.alloc(0), simply to indicate a "reset" of internal buffer state. This is wasteful, requiring many needless allocations when we could simply assign the value to null/undefined.

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: