Skip to content

[Serializer] Allow filtering "object" when using "getSupportedTypes()" #49735

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

Merged

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Follows #49291

This allows telling when only objects are accepted, to skip calling supportsNormalization() when native types are considered.

/cc @tucksaun

@nicolas-grekas nicolas-grekas requested a review from dunglas as a code owner March 19, 2023 18:22
@carsonbot carsonbot added this to the 6.3 milestone Mar 19, 2023
@nicolas-grekas nicolas-grekas force-pushed the ser-wildcard-excludes-native branch 3 times, most recently from 85c1f22 to f8bae70 Compare March 20, 2023 09:43
@nicolas-grekas nicolas-grekas changed the title [Serializer] Allow filtering "native-*" and "object" when using "getSupportedTypes()" [Serializer] Allow filtering "object" when using "getSupportedTypes()" Mar 20, 2023
@nicolas-grekas nicolas-grekas force-pushed the ser-wildcard-excludes-native branch from f8bae70 to e5e58c1 Compare March 20, 2023 11:09
Copy link
Contributor

@tucksaun tucksaun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach as it allows us to be more precise for generic (de)normalizers!
I will try to bench this PR tonight on my (massive) use case.

@nicolas-grekas nicolas-grekas force-pushed the ser-wildcard-excludes-native branch from e5e58c1 to 6984dce Compare March 20, 2023 13:34
@tucksaun
Copy link
Contributor

Bench results: no overall changes, still ~80% gain on getNormalizer and 15% gain on the main WT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants