Closed dannyvw closed 1 week ago
@acrobat I pushed some changed. I cannot generate the same blackfire profile as before because we have changed a lot. But the main thing is that is reduced calls to getHost and isMultiLanuage methods.
Thanks @dannyvw!
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?