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


Fix it, then Ship it!




LGTM. Puzzled me for a bit at why the temporary is being constructed (assuming 
the correct `operator==` for `const char*` was being invoked) till I looked up 
here:

https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/basic_string.h#L2468

```
 Determines the effective length rlen of the strings to compare as the smallest 
of size() and the length of a string constructed from @a __s. 
```


src/common/roles.cpp (line 62)
<https://reviews.apache.org/r/42762/#comment177270>

    Not yours: Can we remove the period at the end of each of the error 
messages?
    
    We dump them with the periods later: 
https://github.com/apache/mesos/blob/master/src/master/master.cpp#L635


- Anand Mazumdar


On Jan. 26, 2016, 12:10 a.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42762/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2016, 12:10 a.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This validation is used inside resource math which in turn is used
> heavily in the code base.
> The temporary string allocations caused a significant performance
> degradation in this critical path.
> 
> 
> Diffs
> -----
> 
>   src/common/roles.cpp 5be807018ff84174cf0cabb933f6828d458d3846 
> 
> Diff: https://reviews.apache.org/r/42762/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>

Reply via email to