Implement an alternative to the LXML backend#554
Draft
Wuestengecko wants to merge 4 commits into
Draft
Conversation
760643f to
fa4f0e1
Compare
ae20d82 to
3d87153
Compare
4f1d591 to
cd7fa65
Compare
88332d7 to
8c01a3a
Compare
077b3bd to
0d89c5a
Compare
4e39e47 to
3e812d8
Compare
90783c5 to
a3c7089
Compare
589105d to
b666fdc
Compare
b666fdc to
cac942f
Compare
cac942f to
adc719d
Compare
f074b57 to
15e15f0
Compare
This commit replaces the used build backend and configuration, as well as the CI workflows, to use maturin instead of setuptools.
Until now, capellambse would load models from older Capella versions. However, support for those versions has been bit-rotting for quite some time already. Capella 7.0.0 is out for more than half a year now, and it recently got its first bug fix update, so it should be safe to bump the minimum required version.
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.
This could prove to be a viable alternative to #217. Initial experimentation has shown promising results with almost 50% reduction in memory use when using a specialized, custom parser built on top of quick-xml even in a still relatively naive implementation, where the main idea is to deduplicate tag and attribute names in memory (using a temporary
HashMapto storeArc<(Option<String>, String)>over directly using the parsed-out(Option<String>, String)on the Rust side, but the same should hold true for the Python equivalents) — and there's probably still a lot of room for further optimizations.This might still prove to be completely non-viable depending on the actual feature set that we'd have to reimplement, but so far the only bigger issues I've found are a few simple XPaths (which should be straight-forward to implement without an XPath engine) and the
MelodyModel.find_references()function, which delegates to C code via an XPath query in order to actually become usable in terms of performance (if I'm not mistaken, runtime went down by at least 2-3 orders of magnitude).