----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64428/#review193167 -----------------------------------------------------------
src/master/master.hpp Line 713 (original), 713 (patched) <https://reviews.apache.org/r/64428/#comment271703> shall we keep a default value? src/master/master.cpp Line 6700 (original), 6694 (patched) <https://reviews.apache.org/r/64428/#comment271700> btw, if large number of frameworks is a concern, we could also avoid double lookup in `hashmap` with something like ``` auto it = fameworks.find(task.framework_id()); CHECK(it != frameworks.end()); injectAllocationInfo( task.mutable_resources(), it->second); ``` src/master/master.cpp Lines 6770 (patched) <https://reviews.apache.org/r/64428/#comment271702> it seems that we can convert directly to `Resources` instead. `Slave`'s constructor for some reason requires `vector<Resources>`, but then converts to `Resources` anyway src/master/master.cpp Lines 6837-6839 (patched) <https://reviews.apache.org/r/64428/#comment271706> we don't really need a conversion to `vector` for `updateSlaveFrameworks` if performance here is a concern. it could take `RepeatedPtrField<FrameworkInfo>` as parameter instead. this is also true for `addSlave` - Dmitry Zhuk On Dec. 7, 2017, 8:46 p.m., Benjamin Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64428/ > ----------------------------------------------------------- > > (Updated Dec. 7, 2017, 8:46 p.m.) > > > Review request for mesos, Dmitry Zhuk and Michael Park. > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > src/master/master.hpp 2658312b0d10a72fefda68c7d3137b94afbd8249 > src/master/master.cpp 2fd66c072e9a194680d7653c664bd8a68ea1d2f0 > > > Diff: https://reviews.apache.org/r/64428/diff/3/ > > > Testing > ------- > > About a 10-20% improvement. > > Before: > Reregistered 2000 agents with a total of 100000 running tasks and 100000 > completed tasks in 2.977767303secs > Reregistered 2000 agents with a total of 200000 running tasks and 0 completed > tasks in 5.642229947secs > Reregistered 20000 agents with a total of 100000 running tasks and 0 > completed tasks in 6.966318315secs > > After: > Reregistered 2000 agents with a total of 100000 running tasks and 100000 > completed tasks in 2.591612374secs > Reregistered 2000 agents with a total of 200000 running tasks and 0 completed > tasks in 4.52633125secs > Reregistered 20000 agents with a total of 100000 running tasks and 0 > completed tasks in 6.449984263secs > > > Thanks, > > Benjamin Mahler > >
