-
Notifications
You must be signed in to change notification settings - Fork 663
feat(xml/unstable): add XML parsing and serialization module #6942
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
base: main
Are you sure you want to change the base?
Conversation
|
could we get some benchmarks comparing to other parsers? |
Yes, that's a good idea. I'll look into it. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6942 +/- ##
==========================================
- Coverage 94.28% 94.23% -0.06%
==========================================
Files 584 610 +26
Lines 43186 45609 +2423
Branches 6933 7501 +568
==========================================
+ Hits 40720 42981 +2261
- Misses 2413 2568 +155
- Partials 53 60 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updated the description now. Let me know if you would like to benchmark against a specific package |
7f792e6 to
e20f201
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.
Sorry, I have no idea why this formatting is happening 😅
|
Ref: denoland/deno#24995 |
Thanks, I was not aware of this discussion. Perhaps we could have it as an unstable module for now? Then we can always kick it out, should the core team decide to implement |
|
Updated again to increase streaming performance and get test coverage to 100% |
|
More perf work. Will look into using callbacks instead of arrays of objects |
New XML parsing and serialization module
What @std/xml has:
What @std/xml doesn't have:
Benchmark Results
Performance work never really ends, and you often find yourself comparing apples and oranges. Anyway. Here goes.
The challengers
Error position tracking is nice for debugging, but really hurts performance. So I made it an option that defaults to true for non-streaming and false for streaming (streaming is usually for trusted data sources. Multi-GB feeds or logs where throughput is critical). The results below contain both with and without error position tracking.
Test data
I used the test files located in
testdatafor non-streaming. I used one 597MB file for the streaming benchmark (google product data), but didn't check that intotestdata. Other payloads may give different results.Small Files (<10KB) — Median Results
1 Large File (301KB) — Median Results
Streaming (a 597MB file) — Median Results