Repository navigation
feat(xml): add eager deserialization for buffered payloads - #846
Closed
stobrien89 wants to merge 1 commit into
Closed
stobrien89 wants to merge 1 commit into
stobrien89 wants to merge 1 commit into
Conversation
Contributor
Author
|
Closing in favor of #849 |
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.
Description
Adds eager XML deserialization for buffered payloads while preserving streaming deserialization for reader inputs.
Changes
XMLDeserializationModewith:AUTO: eagerly parsesbytesand incrementally parsesBytesReaderinputs.EAGER: always materializes the complete XML tree.STREAMING: preserves the existing pull-parser implementation.xml_deserialization_modeto generated Rest XML, AWS Query, and EC2 Query client configurations.Performance
Benchmarked on an x86
m7iinstance using Python 3.12.14, with 5,000 warmup and 10,000 measured iterations.XML-decoding cases improved by 28.1–31.4% at p50.
restXml_CopyObjectOutput_MawsQuery_GetMetricDataResponse_SawsQuery_GetMetricDataResponse_MawsQuery_GetMetricDataResponse_LCases that do not decode an XML document through the payload codec showed benchmark noise:
restXml_CopyObjectOutput_BaselinerestXml_GetObject_SrestXml_GetObject_MrestXml_GetObject_LCompatibility
XMLCodecconstruction remains supported.AUTOpreserves incremental parsing for reader inputs.STREAMINGretains the previous deserialization path.Validation
git diff --checkpassed.