-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Optimized FieldConverter
#7736
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
Optimized FieldConverter
#7736
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Thank you for your submission. We will review this in due course as and when someone is available on the team to do so. |
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!
reader.Read(); | ||
field = reader.GetString(); | ||
} | ||
else if (reader.ValueTextEquals(FormatProperty.EncodedUtf8Bytes)) |
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.
For your info, I proposed an ability to pass an encoded text directly to the reader, but it was declined. See dotnet/runtime#86591.
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
This pull request has three commits:
1.1. Reading doesn't allocate and decode a JSON property name.
1.2. Writing doesn't encode property names.
nameof(Field)
expressions.null
values are handled by the writer itself (see this).