Reduce GC churn when processing cursors

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      pprof analysis of where http://github.com/mongodb-labs/migration-verifier spends its time suggests roughly half of CPU time is spent in GC.

      Pprof suggests that that’s because the driver allocates a new slice for each cursor response:

      Can this be made to use memory pooling to reduce GC churn? Something like https://github.com/libp2p/go-buffer-pool might help.

            Assignee:
            Matt Dale
            Reporter:
            Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: