-
Notifications
You must be signed in to change notification settings - Fork 632
Open
Labels
feature-requestNew feature or enhancement. May require GitHub community feedback.New feature or enhancement. May require GitHub community feedback.p2This is a standard priority issueThis is a standard priority issue
Description
Describe the feature
When XML Parser was investigated for AWS SDK for JavaScript (v3) in Jan 2020, we had only compared pixl-xml
with fast-xml-parser
#735 (comment)
We hadn't considered other xml parsers back then.
We revisited XML parsing as a follow-up to using native DOMParser in browser in #7347
Early benchmarks indicate that @xmldom/xmldom
is faster than fast-xml-parser
for our use cases https://github.com/trivikr/benchmark-xml-parser
Use Case
Switch to a parser which is compliant with DOMParser, as well as performant
Proposed Solution
Replace "fast-xml-parser" with "@xmldom/xmldom" as:
- It has faster parsing for our use cases
- It has more comparable number of downloads
- Comparisons https://npmtrends.com/@xmldom/xmldom-vs-fast-xml-parser-vs-xml2js
- Over 70% of
fast-xml-parser
downloads are from JS SDK v3 https://npmtrends.com/@aws-sdk/core-vs-fast-xml-parser
- It has smaller install size
The bundle size is slightly bigger
- 58.5 kB https://bundlephobia.com/package/@xmldom/xmldom@0.8.11
- 27.6 kB https://bundlephobia.com/package/fast-xml-parser@5.2.5
But that won't impact browser applications, where we use DOMParser
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
SDK version used
N/A
Environment details (OS name and version, etc.)
N/A
Metadata
Metadata
Assignees
Labels
feature-requestNew feature or enhancement. May require GitHub community feedback.New feature or enhancement. May require GitHub community feedback.p2This is a standard priority issueThis is a standard priority issue