----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29134/#review65393 -----------------------------------------------------------
Ship it! include/mesos/resources.hpp <https://reviews.apache.org/r/29134/#comment108498> Ok understood the issue now that we've chatted. How about we move this NOTE down to _contains and highlight that the split exists for performance reasons: ``` // Similar to 'contains(const Resource&)' but skips the validity check. // This can be used to avoid the performance overhead of calling 'contains(const Resource&)' when // the resource can be assumed valid (e.g. it's inside a Resources). // // TODO(jieyu): Measure performance overhead of validity check to ensure this is warranted. bool _contains(const Resource& that) const; ``` src/common/resources.cpp <https://reviews.apache.org/r/29134/#comment108497> Mind adding a note here that we use _contains because Resources only contain valid Resource objects, and we don't want the performance hit of the validity check? - Ben Mahler On Dec. 17, 2014, 1:36 a.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29134/ > ----------------------------------------------------------- > > (Updated Dec. 17, 2014, 1:36 a.m.) > > > Review request for mesos and Ben Mahler. > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > include/mesos/resources.hpp 296553a > src/common/resources.cpp 9bf7ae9 > > Diff: https://reviews.apache.org/r/29134/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >
