leptris 1.9.28 → 1.9.29

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: 5269fdd7c4c775fa14fa07fcaecd4356d6d7b0a04ea0de83f10b8efee3cae4df
4
- data.tar.gz: 2de7f895e3e4fe444375fc800e867f751fd07d5598e09bde80d41d0df2c166bf
3
+ metadata.gz: f91b02217a813c5c7c8eb267b6b82b3eb7689d857fbd76b7a8b108962d56d18c
4
+ data.tar.gz: c15ad7755d849144c45176d4e28f819ac090927c8a1e1d6ad58c89fe8a3006fe
5
5
  SHA512:
6
- metadata.gz: 0e8e507336b7348bba069dba172842a76463939bd472483d5bbba3785d9aa2b8a0a928f484254ea642cfc1cedfc9b1fa29b02adaaecf5675c9881527c54a51ee
7
- data.tar.gz: 81ac2512ce3d76fe7332e7ba53ca5f60d45358271b79ee47652f4043756d7914a0f24efb4031c30401dcf41a3d33adaea6fbfa52aa8993f19b746c11a4a63b52
6
+ metadata.gz: db0800af7aafe8cf8efb263a0fde99d8876b3d8f487a9cbe738bf2d086a9be8a9e6805e9033b3b695b9064e58d4593f0aee4361dcdc55fa2f920e5a71484acb7
7
+ data.tar.gz: ae1282d974199e33a98c9361aee2afb36b7dacfb782259380688cd13e480065d3ff59108be44f868b3283f0f11fb958c37d16f28c9eb5fcfc1a6ac6331020c26
data/CHANGELOG.md CHANGED
@@ -5,6 +5,38 @@ 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.29] - 2026-08-28
9
+
10
+ ### Fixed
11
+
12
+ - **Element-batch truncation (1.9.28 regression)**:
13
+ `fetch_element_children`'s opportunistic growth read its sizing
14
+ from `leptris_element_children(ptr, NULL, 0)` — but that entry
15
+ point has NO count-only mode (NULL returns 0, unlike
16
+ `leptris_node_children`), so the truncation check always judged
17
+ "fits" and wide element families were cut to the scratch
18
+ capacity (32 on a fresh thread/process). `#element_children`
19
+ and `#last_element_child` both affected; elements with 32 or
20
+ fewer element children — and any process whose scratch had
21
+ already grown — were unaffected, which is why the round-XXIII
22
+ suite passed. Sizing now comes from the dedicated
23
+ `leptris_element_child_count`. Two fresh-Thread regression
24
+ specs pin the fresh-scratch state (the scratch is thread-local:
25
+ same-process test ordering had masked it); they fail on 1.9.28.
26
+ The count query fires only when the buffer fills exactly —
27
+ steady-state cost unchanged, the batch's -27% element_children
28
+ win holds.
29
+
30
+ ### Meta
31
+
32
+ - Compiled-expression cache for `Searchable#xpath` prototyped and
33
+ retired by measurement: mixed deltas across expression shapes,
34
+ one stable regression (parent-axis `..` +58% through
35
+ `leptris_xpath_compiled_eval` vs string eval, three interleaved
36
+ passes), suggesting the engine's string path already amortizes
37
+ compilation. Reverted in full; the parent-axis asymmetry is
38
+ worth an upstream look.
39
+
8
40
  ## [1.9.28] - 2026-08-28
9
41
 
10
42
  ### Changed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.28"
4
+ VERSION = "1.9.29"
5
5
  end
@@ -533,7 +533,6 @@ module Leptris
533
533
  attach_function :leptris_xpath_compiled_free,
534
534
 
535
535
  [:leptris_xpath_compiled], :void
536
-
537
536
  attach_function :leptris_sax_parse,
538
537
  [:string, :size_t, :pointer, :pointer], :int
539
538
  attach_function :leptris_sax_parser_create,
@@ -878,7 +877,10 @@ module Leptris
878
877
  cap = buffer.size / PTR_BYTES
879
878
  copied = leptris_element_children(el_ptr, buffer, cap)
880
879
  if copied == cap
881
- total = leptris_element_children(el_ptr, nil, 0)
880
+ # leptris_element_children has NO count-only mode (NULL
881
+ # returns 0, unlike leptris_node_children) — size the
882
+ # regrow from the dedicated counter.
883
+ total = leptris_element_child_count(el_ptr)
882
884
  if total > cap
883
885
  buffer.free
884
886
  buffer = scratch[:pointers] =
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.28
4
+ version: 1.9.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.