> On May 5, 2016, 11:57 p.m., Ben Mahler wrote: > > src/master/master.cpp, lines 5974-5977 > > <https://reviews.apache.org/r/46960/diff/1/?file=1370498#file1370498line5974> > > > > Can we just copy the keys here instead of the entire maps? > > > > ``` > > foreach (const FrameworkID& frameworkId, slave->executors.keys()) { > > foreach (const ExecutorID& executorId, > > slave->executors[frameworkId].keys()) { > > ```
There are other places that can benefit from this too e.g.: https://github.com/apache/mesos/blob/master/src/master/master.cpp#L6546 Would it be fine if I did a sweep in a followup patch? - Anand ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46960/#review131970 ----------------------------------------------------------- On May 4, 2016, 5:14 a.m., Anand Mazumdar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46960/ > ----------------------------------------------------------- > > (Updated May 4, 2016, 5:14 a.m.) > > > Review request for mesos and Ben Mahler. > > > Repository: mesos > > > Description > ------- > > It seems that we removed an else block in 0.26 that removed the > `removeTask` call from the `foreachvalue` loop but we still kept > on copying `slave->tasks` though it is not needed anymore. > > > Diffs > ----- > > src/master/master.cpp 6d3e0f7c634690a35eec1ce827b705e04c3af87e > > Diff: https://reviews.apache.org/r/46960/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Anand Mazumdar > >