Skip to content

Conversation

beevik
Copy link
Owner

@beevik beevik commented Aug 22, 2025

Introduced 4 new functions to support iterator-based traversal of etree hierarchies:

  • ChildElementsSeq
  • SelectElementsSeq
  • FindElementsSeq
  • FindElementsPathSeq

These functions work similarly to their non-Seq counterparts but use go 1.23's iterators to provide better performance during traversal, especially if you need to early-out.

The existing single-element query functions (SelectElement, FindElement and FindElementPath) also benefit from this change because they now early-out after finding the first matching element.

@beevik beevik mentioned this pull request Aug 22, 2025
@beevik beevik force-pushed the iterators branch 7 times, most recently from a721eba to e1cfcb6 Compare August 22, 2025 04:44
beevik added 2 commits August 21, 2025 21:59
Introduced 4 new functions to support iterator-based traversal of
etree hierarchies:

* ChildElementsSeq
* SelectElementsSeq
* FindElementsSeq
* FindElementsPathSeq

These functions work similarly to their non-Seq counterparts but use
go 1.23's iterators to provide better performance during traversal,
especially if you need to early-out.

The existing single-element query functions (SelectElement,
FindElement and FindElementPath) also benefit from this change,
because they now early-out after finding the first matching element.
Also, update actions steps to use latest versions.
@beevik beevik merged commit df3ff12 into main Aug 22, 2025
7 checks passed
@beevik beevik deleted the iterators branch August 22, 2025 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant