mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Zhuk <>
Subject Re: Review Request 60003: Reduced copying in defer, dispatch and Future.
Date Mon, 31 Jul 2017 20:31:25 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated July 31, 2017, 8:31 p.m.)

Review request for mesos, Benjamin Hindman, haosdent huang, James Peach, and Michael Park.


Addressed review comments.

Added benchmark.
Before changes:
Movable elapsed: 7.763873472secs
Copyable elapsed: 8.20426283secs

After changes:
Movable elapsed: 4.749548906secs
Copyable elapsed: 6.266501858secs

Bugs: MESOS-7713

Repository: mesos


This reduces number of copies made for each parameter in a code like this:
future.then(defer(pid, &SomeProcess::someMethod, param1, param2));

For the objects that do not support move semantics (e.g. protobuf messages), number of copies
is reduced from 8-10 to 6. If move semantics is supported, then number of copies is reduced
from 6-7 to 1 if parameter is passed with std::move, or 2 otherwise.

Diffs (updated)

  3rdparty/libprocess/include/process/defer.hpp 7f3369e723cb244e97930621cbba89cf7873567d 
  3rdparty/libprocess/include/process/deferred.hpp e446621be11ac51f5f91c417cc8975e363c2f715

  3rdparty/libprocess/include/process/dispatch.hpp 3a0793888dc0df5e3ec31b06f47cd920c71e0db9

  3rdparty/libprocess/include/process/future.hpp cce950509f58022e79bb51a6e72ea1a005b9cb50

  3rdparty/libprocess/include/process/http.hpp f637999174d92a98208b5fc49a65f9929efb11a0 
  3rdparty/libprocess/src/tests/benchmarks.cpp 694a842e8e18d82ac551749a71764825ba7cb3a9 




make check

Number of copies was checked by using defer to subscribe process for Future callbacks, and
passing parameters that count number of copies made.


Dmitry Zhuk

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message