Skip to content
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

[audit] xml-rs → quick-xml #10

Merged
merged 2 commits into from
Jan 23, 2023
Merged

[audit] xml-rs → quick-xml #10

merged 2 commits into from
Jan 23, 2023

Conversation

dfyz
Copy link
Owner

@dfyz dfyz commented Jan 23, 2023

xml-rs is not maintained anymore. It is apparently currently being transferred, but even if that happens (which is not a given), xml-rs still appears to have a large backlog of unresolved issues. Looks like it's time to switch.

I found two crates that are actively maintained and can do SAX parsing:

  • quick-xml. Clean codebase, no unsafe, lots of tests, lots of recent commits. Lots of dependencies as well, but fortunately all of them are optional except memchr, which I guess is OK. The API is similar to xml-rs, so migration is mostly straightforward.
  • xmlparser. An absolute gem of a library: no dependencies at all, small and clean codebase, no unsafe. Unfortunately, the API doesn't group attributes together (the current geodata importer relies on that), and I don't want to make too invasive changes when switching.

So, quick-xml it is (for now). By the way, it really lives up to its name: importing Serbia now takes 01:08 minutes on my laptop, while it used to take 02:51 minutes.

@dfyz dfyz merged commit ef94af4 into master Jan 23, 2023
@dfyz dfyz deleted the xml-rs-to-quick-xml branch January 23, 2023 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant