json2xml 6.2.0__tar.gz → 6.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {json2xml-6.2.0 → json2xml-6.3.0}/HISTORY.rst +10 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/PKG-INFO +2 -2
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/rust_memory_benchmark.rst +40 -9
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/__init__.py +1 -1
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/dicttoxml.py +474 -252
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/dicttoxml_fast.py +1 -1
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml.egg-info/PKG-INFO +2 -2
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml.egg-info/requires.txt +1 -1
- {json2xml-6.2.0 → json2xml-6.3.0}/pyproject.toml +2 -2
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_dict2xml.py +32 -6
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_dicttoxml_unit.py +62 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/AUTHORS.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/CONTRIBUTING.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/LICENSE +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/MANIFEST.in +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/README.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/Makefile +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/authors.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/benchmarks.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/conf.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/contributing.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/history.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/index.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/installation.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/json2xml.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/make.bat +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/modules.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/readme.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/docs/usage.rst +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/cli.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/json2xml.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/types.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml/utils.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml.egg-info/SOURCES.txt +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml.egg-info/dependency_links.txt +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml.egg-info/entry_points.txt +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/json2xml.egg-info/top_level.txt +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/requirements.in +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/setup.cfg +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/setup.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/__init__.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/conftest.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_cli.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_dicttoxml_fast_fallback.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_json2xml.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_missing_coverage.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_rust_dicttoxml.py +0 -0
- {json2xml-6.2.0 → json2xml-6.3.0}/tests/test_utils.py +0 -0
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
6.3.0 / 2026-06-10
|
|
3
|
+
==================
|
|
4
|
+
|
|
5
|
+
* feat: reduce pure Python serializer allocations in hot dict, list, and scalar paths
|
|
6
|
+
* feat: preserve XML output semantics while reusing validated element-name and attribute work
|
|
7
|
+
* perf: lower peak memory pressure for large conversions after the 6.2.0 Rust bytes-writer release
|
|
8
|
+
* docs: add hyperfine Rust memory benchmark notes with reproduction details and the measured throughput tradeoff
|
|
9
|
+
* chore: release ``json2xml-rs`` 0.4.0 and require it from ``json2xml[fast]`` for accelerated installs
|
|
10
|
+
|
|
11
|
+
|
|
2
12
|
6.2.0 / 2026-06-05
|
|
3
13
|
==================
|
|
4
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: json2xml
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.3.0
|
|
4
4
|
Summary: Simple Python Library to convert JSON to XML
|
|
5
5
|
Author-email: Vinit Kumar <mail@vinitkumar.me>
|
|
6
6
|
License: Apache Software License 2.0
|
|
@@ -32,7 +32,7 @@ Requires-Dist: setuptools; extra == "dev"
|
|
|
32
32
|
Requires-Dist: pygments>=2.20.0; extra == "dev"
|
|
33
33
|
Requires-Dist: xmltodict>=0.12.0; extra == "dev"
|
|
34
34
|
Provides-Extra: fast
|
|
35
|
-
Requires-Dist: json2xml-rs>=0.
|
|
35
|
+
Requires-Dist: json2xml-rs>=0.4.0; extra == "fast"
|
|
36
36
|
Dynamic: license-file
|
|
37
37
|
|
|
38
38
|
.. image:: ./json2xml-hero.png
|
|
@@ -6,7 +6,7 @@ This benchmark compares peak memory usage before and after the Rust serializer s
|
|
|
6
6
|
Summary
|
|
7
7
|
-------
|
|
8
8
|
|
|
9
|
-
The current branch reduces serializer peak RSS by about **77.
|
|
9
|
+
The current branch still reduces serializer peak RSS by about **77.43 MiB** on a 100,000-record payload that produces **78.17 MiB** of XML. That is a **49.1% reduction** in serializer memory delta compared with the previous PR commit.
|
|
10
10
|
|
|
11
11
|
.. list-table::
|
|
12
12
|
:header-rows: 1
|
|
@@ -23,10 +23,10 @@ The current branch reduces serializer peak RSS by about **77.44 MiB** on a 100,0
|
|
|
23
23
|
- 157.70 MiB
|
|
24
24
|
- 0.180s
|
|
25
25
|
* - Current
|
|
26
|
-
- ``
|
|
27
|
-
-
|
|
28
|
-
- 80.
|
|
29
|
-
- 0.
|
|
26
|
+
- ``43543e8`` + worktree
|
|
27
|
+
- 270.91 MiB
|
|
28
|
+
- 80.27 MiB
|
|
29
|
+
- 0.232s
|
|
30
30
|
|
|
31
31
|
The memory result matches the implementation change: the previous version held roughly one final XML payload in Rust plus one Python ``bytes`` payload, while the current version writes into the Python ``bytes`` object directly.
|
|
32
32
|
|
|
@@ -36,14 +36,14 @@ Methodology
|
|
|
36
36
|
The benchmark uses ``benchmark_memory_rust.py`` with a deterministic generated payload so the Rust fast path can be measured without file parsing or pure-Python fallback behavior.
|
|
37
37
|
|
|
38
38
|
* Machine: Apple Silicon arm64
|
|
39
|
-
* OS: macOS 26.5
|
|
39
|
+
* OS: macOS 26.5.1
|
|
40
40
|
* Python: 3.14.0
|
|
41
41
|
* Build: ``python3 -m maturin develop --release --offline``
|
|
42
42
|
* Payload: 100,000 nested records
|
|
43
43
|
* Input JSON size: 44.31 MiB
|
|
44
44
|
* Output XML size: 78.17 MiB
|
|
45
45
|
* Measurement: process ``ru_maxrss`` after payload creation versus peak after ``json2xml_rs.dicttoxml(payload, attr_type=True)``
|
|
46
|
-
* Sampling:
|
|
46
|
+
* Sampling: five fresh Python processes for the current version using ``hyperfine 1.20.0 --runs 5 --show-output --export-json``
|
|
47
47
|
|
|
48
48
|
The baseline RSS is captured after the large Python payload is already built. The reported serializer delta is ``peak_rss - baseline_rss``, which focuses the comparison on output construction rather than payload allocation.
|
|
49
49
|
|
|
@@ -89,11 +89,41 @@ Raw Samples
|
|
|
89
89
|
- 271.55 MiB
|
|
90
90
|
- 80.30 MiB
|
|
91
91
|
- 0.258s
|
|
92
|
+
* - current-hyperfine-1
|
|
93
|
+
- 190.77 MiB
|
|
94
|
+
- 271.12 MiB
|
|
95
|
+
- 80.36 MiB
|
|
96
|
+
- 0.233s
|
|
97
|
+
* - current-hyperfine-2
|
|
98
|
+
- 190.66 MiB
|
|
99
|
+
- 271.02 MiB
|
|
100
|
+
- 80.36 MiB
|
|
101
|
+
- 0.234s
|
|
102
|
+
* - current-hyperfine-3
|
|
103
|
+
- 190.62 MiB
|
|
104
|
+
- 270.98 MiB
|
|
105
|
+
- 80.36 MiB
|
|
106
|
+
- 0.234s
|
|
107
|
+
* - current-hyperfine-4
|
|
108
|
+
- 190.78 MiB
|
|
109
|
+
- 270.84 MiB
|
|
110
|
+
- 80.06 MiB
|
|
111
|
+
- 0.231s
|
|
112
|
+
* - current-hyperfine-5
|
|
113
|
+
- 190.38 MiB
|
|
114
|
+
- 270.61 MiB
|
|
115
|
+
- 80.23 MiB
|
|
116
|
+
- 0.229s
|
|
117
|
+
|
|
118
|
+
Hyperfine Result
|
|
119
|
+
----------------
|
|
120
|
+
|
|
121
|
+
Hyperfine measured full fresh-process runtime for the current benchmark command at **684.3 ms +/- 26.5 ms** across five runs, with a range of **664.1 ms to 728.0 ms**. The exported hyperfine memory sample was **272.59 MiB**, which is consistent with the script's average peak RSS of **270.91 MiB**.
|
|
92
122
|
|
|
93
123
|
Tradeoff
|
|
94
124
|
--------
|
|
95
125
|
|
|
96
|
-
The memory improvement comes with a throughput cost in this release benchmark. Average conversion time increased from 0.180s to 0.
|
|
126
|
+
The memory improvement comes with a throughput cost in this release benchmark. Average conversion time increased from the previous 0.180s to the current hyperfine-sampled 0.232s, about **29.0% slower** for this payload.
|
|
97
127
|
|
|
98
128
|
That cost is likely from routing every XML write through ``std::io::Write`` and PyO3's bytes writer. The memory win is substantial for large outputs, but latency-sensitive callers may want more timing data before treating the bytes-writer path as a universal improvement.
|
|
99
129
|
|
|
@@ -105,6 +135,7 @@ Run each version in a fresh process after installing the desired Rust extension
|
|
|
105
135
|
.. code-block:: bash
|
|
106
136
|
|
|
107
137
|
python3 -m maturin develop --release --offline
|
|
108
|
-
|
|
138
|
+
hyperfine --runs 5 --show-output --export-json /private/tmp/json2xml-rust-memory-hyperfine.json \
|
|
139
|
+
'python3 benchmark_memory_rust.py --records 100000 --label current-hyperfine'
|
|
109
140
|
|
|
110
141
|
For the previous comparison, install commit ``7dd86b0`` in a temporary worktree, then run the same command from the main checkout so the benchmark script stays identical.
|