leptris 1.9.162.0 → 1.9.162.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/document.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7a0d781b64373e54b12695b3729ee006b1fd142cc72b2d46db4a6f7314e0c0e8
|
|
4
|
+
data.tar.gz: 23acc9e2a5d5c9a014e0d480729d7f569f662274956c56fcc22e54795f050b57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 559c4771c00c196028387b1f9376581227792f3f979bbb11960807b2ce3f2f51f231fd67d1131034362eb5bd80a8ad062d5c1da59b5ad45805a68c4e2f1561da
|
|
7
|
+
data.tar.gz: 5cb77399413c18c75ea0256a3ac6b62c98d2a4988c72b952337d0f047eee0fd4820e52961a4a4e16a1bbf09a188878e953429f24816ad7c431193e67b4bdfdde
|
data/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,16 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [1.9.162.
|
|
8
|
+
## [1.9.162.1] - 2026-09-14
|
|
9
|
+
|
|
10
|
+
### Performance
|
|
11
|
+
|
|
12
|
+
- **#187 (small-document parse)**: the default `Document.parse`
|
|
13
|
+
path (no options, no recover) no longer allocates a ParseOptions
|
|
14
|
+
just to discover flags==0 — measured 10.2 -> 6.5 us on a ~80-byte
|
|
15
|
+
document (-36%); the profile's ParseOptions/Class#new shares drop
|
|
16
|
+
out. Options/recover paths unchanged.
|
|
17
|
+
\n## [1.9.162.0] - 2026-09-14
|
|
9
18
|
|
|
10
19
|
### Added
|
|
11
20
|
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/document.rb
CHANGED
|
@@ -62,6 +62,18 @@ class Leptris::XML::Document
|
|
|
62
62
|
if xml.empty?
|
|
63
63
|
raise Leptris::XML::ParseError, "empty input"
|
|
64
64
|
end
|
|
65
|
+
# The default path (no options, no recover) allocates nothing:
|
|
66
|
+
# ParseOptions.new here would only discover flags==0 (#187 —
|
|
67
|
+
# per-call overhead is most of a small-document parse).
|
|
68
|
+
if options.nil? && !recover
|
|
69
|
+
raw = Leptris::XML::FFI.leptris_parse_string(xml, xml.bytesize, nil)
|
|
70
|
+
if raw.null?
|
|
71
|
+
raise Leptris::XML::ParseError,
|
|
72
|
+
"leptris_parse_string failed: " +
|
|
73
|
+
Leptris::XML::FFI.leptris_last_error.to_s
|
|
74
|
+
end
|
|
75
|
+
return wrap(raw).tap { |doc| doc.readonly! if readonly }
|
|
76
|
+
end
|
|
65
77
|
if options.nil?
|
|
66
78
|
options = Leptris::XML::ParseOptions.new(recover: recover)
|
|
67
79
|
elsif recover && !options.recover?
|