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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c862a7a722a5595a09c5f2507c0f27cfb17a15d5a3216147301b07dcde63d75e
4
- data.tar.gz: 2e672c08d5f6149c8bbda83fa4bb9be56ca981a290172a8e9fb4835c86d6ea58
3
+ metadata.gz: 7a0d781b64373e54b12695b3729ee006b1fd142cc72b2d46db4a6f7314e0c0e8
4
+ data.tar.gz: 23acc9e2a5d5c9a014e0d480729d7f569f662274956c56fcc22e54795f050b57
5
5
  SHA512:
6
- metadata.gz: 65bf38576bd8bd1873946b7944661b450a7f2ccc42e82eae2f875e8667cc2809cb634172d7ddaf997b5040273b3dfd7608b501be21f1c27a309fd4ac2c62c226
7
- data.tar.gz: 24c01320b932f27ba2483c46777ffd7e16c841b19aaa2bf78c2dbddc982eb35b46d4b9d58bbb81754ee51cb40423cc1f0b20bce25688427d067f2db37f0a0673
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.0] - 2026-09-14
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.162.0"
4
+ VERSION = "1.9.162.1"
5
5
  end
@@ -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?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.162.0
4
+ version: 1.9.162.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.