Problem/Motivation
Redirect destination paths are stored in the redirect table as URIs, for example:
internal:/node/123
entity:/node/456
internal:/search/site/
These URIs must be transformed into the correct internal paths or path aliases, as the REST resource needs to return the final, human-readable alias to the front end.
Resolving them through Drupal's URL system (for example, using Url::fromUri()) requires bootstrapping a large portion of Drupal and triggers multiple additional operations. When processing a large number of redirects, this introduces a significant performance overhead and becomes a major bottleneck.
Proposed resolution
Implement an approach based on chunked queries to the path_alias table to resolve destination URIs that use the internal and entity schemes, avoiding the need to invoke Drupal's full URL resolution system.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork next_redirects-3564877
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:
Comments
Comment #3
camilo.escobar commentedComment #4
camilo.escobar commentedComment #5
camilo.escobar commentedFixed and tagged as
1.0.1.Comment #7
camilo.escobar commented