-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] AbstractObjectNormalizer improve performance #28277
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
Conversation
969ff54
to
3dcc828
Compare
} | ||
} | ||
} | ||
|
||
return null; | ||
return $this->typesCache[$key] = null; |
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.
isset($this->typesCache[$key])
will be false
anyway if the value is null
.
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.
You're right. Now marked as false
and added extra check at the start to avoid using array_key_exists()
aca08e4
to
626d93d
Compare
626d93d
to
4224145
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.
LGTM, thanks!
Thank you @martiis. |
…nce (martiis) This PR was merged into the 4.2-dev branch. Discussion ---------- [Serializer] AbstractObjectNormalizer improve performance | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28276 | License | MIT Check ticket for description Commits ------- 4224145 [Serializer] AbstractObjectNormalizer improve perf when checking types
Check ticket for description