Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
In \Drupal\system\Controller\SystemController::overview() we do the expensive check before the cheap check.
Proposed resolution
Swap the if around. This can result in massive performance boosts if the user doesn't have the 'administer site configuration'
and is on a system overview page.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3205344-2.patch | 998 bytes | alexpott |
Comments
Comment #2
alexpottComment #3
alexpottHere's a profile with a user with the 'access administration pages' permission but not 'administer site configuration' - before and after this change...
https://blackfire.io/profiles/compare/1f42025a-c73e-4fa5-9e2f-3c5b508f88...
The numbers speak for themselves... headlines: 89% less queries... response measured in ms not secs...
Comment #4
vijaycs85+1 Simple fix that would bring the overview page execution much lower for the users without `administer site configuration` permission.
Comment #7
catchCommitted/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!