----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64028/#review191755 -----------------------------------------------------------
Should we be implementing a += overload against `RepeatedPtrField<Resource>` instead of doing this? Would that be more efficient than doing a conversion then adding? I'm also hoping to avoid code having to this type of conversion, ideally :) - Benjamin Mahler On Nov. 22, 2017, 1:24 p.m., Dmitry Zhuk wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64028/ > ----------------------------------------------------------- > > (Updated Nov. 22, 2017, 1:24 p.m.) > > > Review request for mesos, Benjamin Mahler and Michael Park. > > > Repository: mesos > > > Description > ------- > > `RepeatedPtrField<Resource>` can be implicitly converted to `Resources`, > leading to hidden multiple resources conversions on performance-critical > paths in master. For example, `operator +=` relies on implicit > conversion, when invoked with `RepeatedPtrField<Resource>` argument. > > > Diffs > ----- > > src/master/master.hpp 2a2e830354db4a2191fb8321beb8174b80f7ba7d > src/master/master.cpp 7417b5d641fd4bb6d91cb0e6456c60201bbc8206 > > > Diff: https://reviews.apache.org/r/64028/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Dmitry Zhuk > >
