> On Dec. 18, 2014, 12:13 a.m., Ben Mahler wrote:
> > include/mesos/resources.hpp, line 113
> > <https://reviews.apache.org/r/29134/diff/1/?file=793483#file793483line113>
> >
> >     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;
> >     ```

Thanks! Added.


> On Dec. 18, 2014, 12:13 a.m., Ben Mahler wrote:
> > src/common/resources.cpp, line 428
> > <https://reviews.apache.org/r/29134/diff/1/?file=793484#file793484line428>
> >
> >     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?

Done.


- Jie


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29134/#review65393
-----------------------------------------------------------


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
> 
>

Reply via email to