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

CommentFileSizeAuthor
#2 3205344-2.patch998 bytesalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
998 bytes
alexpott’s picture

Here'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...

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community

+1 Simple fix that would bring the overview page execution much lower for the users without `administer site configuration` permission.

  • catch committed 92e2daf on 9.2.x
    Issue #3205344 by alexpott: Calling system_requirements() can be...

  • catch committed 911bf0a on 9.1.x
    Issue #3205344 by alexpott: Calling system_requirements() can be...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.