Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RedirectBundle] Improve performance of the redirect router #3239

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

acrobat
Copy link
Member

@acrobat acrobat commented Jan 11, 2023

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #3228

I've tested this with a fresh demo site setup in production mode and with a set of 100 000 redirects and this resulted in a huge improvement in both request time and memory usage.

Overview:
image

Request time:
image

Memory usage:
image

@acrobat acrobat added this to the 6.1.9 milestone Jan 11, 2023
@dannyvw
Copy link
Contributor

dannyvw commented Jan 11, 2023

This code does not work on 6.1 due too low doctrine/dbal version. For 6.2 there are no issues.

The following use cases does currently not work, but works with the old code:

Other than that it looks good :)

@acrobat acrobat changed the title Redirect performance [RedirectBundle] Improve performance of the redirect router Jan 11, 2023
@dannyvw
Copy link
Contributor

dannyvw commented Feb 3, 2023

if origin does not start with a slash in the db

Query does not match

Extra use case:

  • Wildcard redirects working different. Before a request to /test/test with configuration origin (/test/*) and target (/new) redirect to /new/test. Now it redirects to /new

@acrobat acrobat changed the base branch from 6.1 to 6.x February 6, 2023 09:38
@acrobat acrobat modified the milestones: 6.1.9, 6.3.0 Feb 7, 2023
@acrobat acrobat force-pushed the redirect-performance branch 3 times, most recently from ed80a65 to d3e611e Compare February 9, 2023 09:26
@acrobat acrobat merged commit 4a77b6d into Kunstmaan:6.x Feb 9, 2023
@acrobat acrobat deleted the redirect-performance branch February 9, 2023 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RedirectBundle] Slow performance with many redirects (4000+)
2 participants