Almost every call to isCascadeProtected() (which uses short-circuit mode) is followed by a call to getCascadeProtectionSources() (which doesn't), so this attempted optimization (skipping a loop that does some very cheap operations) actually results in worse performance in the common case (because the result of the database query can't be cached in short-circuit mode, and we must query it again), and it makes the code really annoying to read or modify. Relevant code: https://codesearch.wmcloud.org/search/?q=getCascadeProtectionSources\(|isCascadeProtected\(&excludeFiles=RestrictionStore.php|HISTORY|tests%2F Change-Id: Ib9eb6cab28492776d40a10cbfb28e9c1cec8c1d2 (cherry picked from commit f9180c4a36fb8874fc0211f05a1eebaceb67aa0c) |
||
|---|---|---|
| .. | ||
| Hook | ||
| Authority.php | ||
| GrantsInfo.php | ||
| GrantsLocalization.php | ||
| GroupPermissionsLookup.php | ||
| PermissionManager.php | ||
| PermissionStatus.php | ||
| RateLimiter.php | ||
| RateLimitSubject.php | ||
| RestrictionStore.php | ||
| SimpleAuthority.php | ||
| UltimateAuthority.php | ||
| UserAuthority.php | ||