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

fix: avoid looping through each service when the service ID is missing from the PSR container and has to be loaded via ServiceManager #1146

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

wazelin
Copy link
Member

@wazelin wazelin commented Jan 13, 2025

LSI-5144

This PR is inspired by the problem described in oat-sa/extension-tao-testqti#2565.

The PR avoids multiple long loops through each service when the service ID provided is missing from the PSR container and has to be loaded via the ServiceManager.
See https://github.com/symfony/dependency-injection/blob/5.4/Container.php#L262-L270.

I expect this PR to give TAO 3.x a measurable performance boost.

…g from the PSR container and has to be loaded via ServiceManager
@wazelin wazelin force-pushed the fix/LSI-5144/avoid-looping-through-each-service branch from 0a12247 to a3ec73a Compare January 13, 2025 14:44
Copy link

Version

Target Version 16.0.2
Last version 16.0.1

There are 0 BREAKING CHANGE, 0 feature, 1 fix

@wazelin wazelin merged commit 3297622 into develop Jan 13, 2025
5 checks passed
@wazelin wazelin deleted the fix/LSI-5144/avoid-looping-through-each-service branch January 13, 2025 15:01
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.

3 participants