xml2json extremely slow
See original GitHub issueSummary
When trying to convert some XMLs to pyhf JSON, I found that the runtime was unacceptably slow (order of hours).
OS / Environment
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux-logo
Steps to Reproduce
The XMLs are ATLAS internal, but I’m happy to share them with ATLAS members of the dev team on request.
File Upload (optional)
No response
Expected Results
I was hoping it would finish relatively fast.
Actual Results
It took hours.
pyhf Version
pyhf, version 0.6.3
uproot 4.2.2
Code of Conduct
- I agree to follow the Code of Conduct
Issue Analytics
- State:
- Created a year ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Why xml to json conversion is so slow? - Stack Overflow
I'm currently trying to improve the performances of my website but the XML2JSON lib I'm using is slowing the process and blocking the ......
Read more >toXml is very slow when json is large · Issue #61 - GitHub
We have a 200 * 500 cells excel (all data is present as xml in xlsx) work sheet. It takes 200 ms to...
Read more >XML to JSON policy runtime error troubleshooting | Apigee Edge
This error occurs if the message or string variable specified in the <Source> element of the XML to JSON policy is either:.
Read more >How to Convert JSON to XML or XML to JSON in C# - Code ...
Demonstrate how to convert JSON to XML back and forth using System.Text.Json and Newtonsoft.Json with detail explanation and examples.
Read more >Convert XML to JSON with JavaScript - David Walsh Blog
Due to the number of iterations, it would cause the overall parsing be extremely slow. David– Thank you for providing this function. Would...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

A final note on this, as I write up the release notes in PR #1705:
👍 Great work by @kratsg! 🚀
This will be better with #1909 but you can already use
--basedirto change the base of the relative paths, by prefixing them, so it doesn’t necessarily need to be in the same place.