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

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • 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: