Branch: refs/heads/2.0.0
Home:
https://github.com/tribe29/checkmk
Commit: a281cc764d12dc7a1020adbd776e22d22ade4af8
https://github.com/tribe29/checkmk/commit/a281cc764d12dc7a1020adbd776e22d22…
Author: Sven Panne <sven.panne(a)tribe29.com>
Date: 2022-03-21 (Mon, 21 Mar 2022)
Changed paths:
M livestatus/src/TableHostsByGroup.cc
M livestatus/src/TableServicesByGroup.cc
Log Message:
-----------
Removed a performance pessimization regarding authorization.
There were a few broken attempts in the code to "improve" authorization
performance, which actually made things *much* worse in the extreme case: To
avoid a check which only costs O(1) per host, an authorization check was
left out under some circumstances. The equivalent check was implictly done
later when the hosts were processed, but only *after* any filters have been
evaluated. If the filters do some non-trivial work, this is a bad tradeoff.
In general: Try to filter out things as soon as possible, this will give the
best complexity, and avoid premature "optimizations", which might turn out
to make things worse.
Change-Id: I872d5cfd14e3811add1997c720bade7d4aa3ea05