drupal_goto short circuits and doesn't set things to cache

Created on 20 November 2018, about 6 years ago
Updated 10 November 2023, about 1 year ago

Problem/Motivation

drupal_page_footer() normally is called at the end of any page load. However, if someone calls drupal_goto or sets $form_state['redirect'], then any classes that are autoloaded or any other thing that normally gets cached in drupal_page_footer() isn't called. This results _registry_check_code() not finding the classes in $lookup_cache and having to re-query registry table. Not a huge performance hit, but in my case, it resulted in 5 or 6 queries for classes on every single form submit.

Proposed resolution

Perform system caching before redirect.

Remaining tasks

  1. Create patch with tests.
  2. Review patch.
  3. Commit patch.
πŸ› Bug report
Status

Needs review

Version

7.0 ⚰️

Component
BaseΒ  β†’

Last updated about 4 hours ago

Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
  • Needs framework manager review

    It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024