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

[MultidomainBundle] Improve domain based locale router performance #3444

Open
wants to merge 4 commits into
base: 7.x
Choose a base branch
from

Conversation

dannyvw
Copy link
Contributor

@dannyvw dannyvw commented Oct 8, 2024

Q A
Bug fix? no
New feature? no
BC breaks? yes?
Deprecations? no
Fixed tickets comma separated list of tickets fixed by the PR

This line https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/7.x/src/Kunstmaan/MultiDomainBundle/Router/DomainBasedLocaleRouter.php#L175 decrease performance when you have many links. The "isMultiLanguage" check is also done inside "getSlugRouteParameters" so it is not necessary to perform that inside the "getRouteCollection" for every link. Runtime checks inside "getRouteCollection" are slow (https://github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Routing/RouterInterface.php#L29)

We have about 20/25% profit on a page with only a menu and footer.

The only BC break is as the removed methods are overridden. We can solve it maybe with an config setting to switch to the improved router? Is this needed to implement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant