Refactor connection checkout to reduce layers

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python 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

      Context

      Currently, acquiring a connection requires passing through several functions and context managers. We should reduce the number of layers to reduce the overhead of checking a connection in and out. From investigation in PYTHON-5007 this approach can increase thread efficiency for small reads by about 10%. Additionally, RunCommand and RunCommand8Threads both showed improvement in this patch build, with this diff.

      Definition of done

      Flatten the checkin/checkout path where possible, while avoiding any regressions.

      Pitfalls

      We may have to duplicate logic to allow for flattening.
      We should wait until the backpressure branch is merged, since it is making changes to the way connections are checked in/out.

            Assignee:
            Unassigned
            Reporter:
            Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: