Title: #455: mmap_cache: make checks independent of input size
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
"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.
> >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.
See the full comment at
sssd-devel mailing list -- email@example.com
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org