Reduce the number of futures in command execution path

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: Internal Code
    • Fully Compatible
    • v5.0
    • Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-05-31
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Amirsaman Memaripour
            Reporter:
            Amirsaman Memaripour
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: