Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55800

Reduce the number of futures in command execution path

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • None
    • Internal Code
    • Fully Compatible
    • v5.0
    • Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-05-31
    • 0

    Description

      Constructing a new future (i.e., an instance of Future, SemiFuture and ExecutorFuture) is not cheap and imposes some cost both at its construction and destruction. Some of this cost is attributed to heap-allocations and known inefficiencies of releasing memory allocated by other threads.

      We can reduce the number of futures constructed in the command execution path, by merging continuations and changing blocking functions to return basic types instead of values wrapped in futures. This transition could help with reducing the latency of command execution.

      Attachments

        Activity

          People

            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: