fix: perf regression with Symfony 6.3 #5721
Merged
Merged
Conversation
Member
Author
|
Actually, I'm not sure that we can enable the cache for these normalizers. Items must be object that aren't traversable. I don't think that Symfony currently allows doing that. |
Member
Author
|
Answer to myself: we can because the cache is split per concrete type, so this PR is ready to be merged. https://github.com/symfony/symfony/blob/6.4/src/Symfony/Component/Serializer/Serializer.php#L265 |
Contributor
|
Thank you @dunglas 👍 |
Romaixn
pushed a commit
to Romaixn/core
that referenced
this pull request
Oct 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The switch to the new
NormalizerInterface::getSupportedTypes()system provided by Symfony in #5672 introduced a performance regression.Symfony 6.2 + API Platform 3.1.12 (faster) VS Symfony 6.3 + API Platform 3.1.13
With this patch fixes the issue: Symfony 6.2 + API Platform 3.11.12 VS Symfony 6.3 + API Platform with this patch