Problem/Motivation
During the form alter, simple sitemap first sets up the state, and parses the sitemaps to determine of the content type is used in a sitemap. Only after all this work, does it check if the user has access to edit sitemaps. On a large site, with multiple sitemap variations and a large number of entity types, this can cause an extra second of processing which is unnecessary for anonymous users.
Steps to reproduce
Install simple_sitemap and domain_access modules. Add a few domains and create sitemap variations for the domains.
Proposed resolution
Check permissions before we start handling the entity type and sitemap variations.
Remaining tasks
Review Changes.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork simple_sitemap-3250675
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3250675-form-alter-triggers
changes, plain diff MR !31
Comments
Comment #3
richgerdesOpened branch and MR.
Comment #4
gbyteComment #6
gbyteFair enough, thanks.