wiki.techinc.nl/includes/Permissions
Máté Szabó aa3b388b5b Permissions: Avoid RestrictionStore lookup for unsupported actions
When rendering Special:RecentChanges for an user with rollback rights,
the software checks whether the user has permission to perform the
rollback action on each entry via User::probablyCan(), which
delegates to PermissionManager. This in turn checks for each entry
whether the title has protections (e.g. from action=protect) against the
"rollback" action, which is unlikely to be the case since by default
wgRestrictionTypes only supports create/edit/move/upload.

This triggers noticeable memcached I/O and overhead.[1]

So, as an optimization, avoid fetching page restrictions in
RestrictionStore for action types that are known to not be restrictable
via page protection. In the unlikely event that wgRestrictionTypes is
customised to offer separate restrictions for "rollback", this will
work continue to work as expected and is covered by tests.

-
[1] acd6281072/recentchanges.speedscope.json

Bug: T341319
Change-Id: I912e4ef2fa3d48238c01631d4f35940aea93ab03
2024-04-11 21:02:53 +00:00
..
Hook Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
Authority.php Remove more indirect calls to IDBAccessObject::READ_* constants 2024-01-23 15:42:38 +01:00
GrantsInfo.php authz: Group grants by riskiness 2024-01-16 23:55:48 +01:00
GrantsLocalization.php GrantsLocalization: Move grant risk level labels from CSS to HTML 2024-01-16 23:55:48 +01:00
GroupPermissionsLookup.php permissions: improve GroupPermissionsLookup documentation 2023-10-19 19:53:55 +00:00
PermissionManager.php Namespace includes/cache 2024-02-20 10:28:03 -05:00
PermissionStatus.php Permissions: Remove duplicated PHPDocs from Authority subclasses 2023-09-07 10:53:03 +02:00
RateLimiter.php Namespace remaining User-related classes under \MediaWiki\User 2023-09-20 09:12:08 +01:00
RateLimitSubject.php Extract RateLimiter from User 2022-06-27 13:23:24 +00:00
RestrictionStore.php Permissions: Avoid RestrictionStore lookup for unsupported actions 2024-04-11 21:02:53 +00:00
SimpleAuthority.php Remove more indirect calls to IDBAccessObject::READ_* constants 2024-01-23 15:42:38 +01:00
UltimateAuthority.php Remove more indirect calls to IDBAccessObject::READ_* constants 2024-01-23 15:42:38 +01:00
UserAuthority.php Namespace includes/context 2024-02-08 11:07:01 -05:00