Improve laziness of container XML parsing#487
Conversation
| public function getService(string $id): ?ServiceDefinition; | ||
|
|
||
| public static function getServiceIdFromNode(Expr $node, Scope $scope): ?string; | ||
| public function getServiceIdFromNode(Expr $node, Scope $scope): ?string; |
There was a problem hiding this comment.
I think this is a BC break, given the fact that the interface has @api. If someone implements the interface his code will break.
Same exist for ParameterMap ; so I'll need @ondrejmirtes review.
|
Yeah, removing the |
|
@ondrejmirtes Yes, I'll rework this to maintain BC. Removing the static would make sense for 3.0 - all the existing calls are on a dynamically resolved instance. No true static calls exist and given the implemented logic, they should not exist. |
|
@xificurk please also provide a profiler screenshot / hyperfine perf numbers so we can see the impact of this PR |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Parsing the XML into the DTOs is a costly operation on large Kernels. This PR defers the ServiceMap and ParameterMap initialization until the first use of their content.