URL: https://github.com/SSSD/sssd/pull/455
Title: #455: mmap_cache: make checks independent of input size

mzidek-rh commented:
"""
On 11/23/2017 12:50 PM, lslebodn wrote:
> On (23/11/17 11:31), mzidek-rh wrote:
>  >mzidek-rh commented on this pull request.
>  >I do not think such optimisation is needed
> 
> And I do not think that these checks for corrupted memory cache are needed
> since 1.11.90. But I'm fine with having them.
> 
>  >because it will almost always be evaluated as false
> 
> That statement is true also for other checks for "corrupted" mmap cache.

Please avoid cherry picking my sentences in a way that changes the original 
meaning and also do not put them in inappropriate context. The statement I said 
is NOT true for the checks for corrupted mmap cache, because the whole 
statement was:

"I do not think such optimisation is needed because it will almost always be 
evaluated as false and in case it is evaluated as true it will only save us 
from doing few more checks. "

So my point was that we do some computation in order to avoid just a slightly 
bigger computation, but we will almost never avoid it anyway. And as we know, 
the checks for corrupted mmap cache were not an optimisation, so the statement 
is simply not applicable to that case unless you remove part of the statement 
and put it to a new context. But by doing that you are creating your own 
statement that has nothing to do with what I said.

But as I said, I do not dislike the check becuase in my (very subjective) 
opinion it makes the code easier to read.

Michal

> 
>  >and in case it is evaluated as true it will only save us from doing 
> few more checks. But maybe having this check makes this part of code 
> more readable (at least it looks that way to me)? So I am OK with it.
>  >
> 
> Thank you for confirmation that you are fine with such check.
> 
> LS
> 
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/455#issuecomment-346605877
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to