----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60545/#review179327 -----------------------------------------------------------
@abudnik do you have any benchmarking around this change? - James Peach On June 29, 2017, 5:08 p.m., Andrei Budnik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60545/ > ----------------------------------------------------------- > > (Updated June 29, 2017, 5:08 p.m.) > > > Review request for mesos, Alexander Rukletsov and Michael Park. > > > Repository: mesos > > > Description > ------- > > DispatchEvent contains value of pointer-to-member function stored in > std::string, which is calculated each time DispatchEvent object is > constructed. However, this value is used only in tests (see > FUTURE_DISPATCH), imposing unnecessary overhead in production. > This patch introduces lazy evolution of pointer-to-member by storing > std::function object instead of std::string. Wrapper function captures > value of pointer-to-member function and returns its stringified version > on invocation. This function invoked by demand in test code, hence > mitigating overhead of evaluation and storing value of pointer to > member function. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/dispatch.hpp > 3a0793888dc0df5e3ec31b06f47cd920c71e0db9 > 3rdparty/libprocess/include/process/event.hpp > 8afe6266eb0dc5a17af35d79efb6bfdf9e6a0ee9 > 3rdparty/libprocess/include/process/gmock.hpp > e9af943b39436f365fe687301febb5c7fbefffc4 > 3rdparty/libprocess/src/process.cpp > 8ff37d1b5781c42f96be2da391ed000158eea7b8 > > > Diff: https://reviews.apache.org/r/60545/diff/1/ > > > Testing > ------- > > 1. make check (mac os x 10.12, fedora 25) > 2. internal CI > > > Thanks, > > Andrei Budnik > >