-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
[GraphQL] Avoid to call serialize in ItemNormalizer #2576
[GraphQL] Avoid to call serialize in ItemNormalizer #2576
Conversation
3a8e28a
to
e3da7e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I read this is a good performance improvement :p.
e3da7e6
to
258f4a8
Compare
@alanpoulain , when this patch will be merged to release branch? |
@Siregacvek It'll be in |
@teohhanhui , well, it's better than in 2.6 :) |
@@ -36,8 +36,8 @@ public function __construct(IriConverterInterface $iriConverter) | |||
public function __invoke($source, $args, $context, ResolveInfo $info) | |||
{ | |||
$property = null; | |||
if ('id' === $info->fieldName && isset($source[ItemNormalizer::ITEM_KEY])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to make 'id' and '_id' as consts of IndentifiersExtractor
class.
* Avoid to call serialize in ItemNormalizer * Allow composite identifiers in getItemIriFromResourceClass (cherry picked from commit b3bd652)
…form#2576)" This reverts commit 90b8690
* Avoid to call serialize in ItemNormalizer * Allow composite identifiers in getItemIriFromResourceClass (cherry picked from commit b3bd652)
Following #2358.
Replace calls to serialize with computed data in the normalizer to improve performance.
In master because there are some BC breaks (but no deprecated since it's still experimental).