Redirect does many unecessary entity_load() when having many redirects with query strings

Created on 23 October 2013, over 11 years ago
Updated 20 May 2025, about 5 hours ago

I have many thousands of redirects of this type: <front>/?p=4567

This works fine, except that on the front page of the site, Redirects loads all of these redirects via redirect_load() and entity_load(), even though all of them have query parameters in the source_options, and I am visiting the front page without any query parameters. So this seems very inefficient.

My solution to this is to adjust redirect_init() and redirect_get_current_redirect() to simply never redirect from the front page when we also do not have any query parameters in the URL. See below for patch.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡°Denmark achton Denmark

Live updates comments and jobs are added and updated live.
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