Skip to content

Use empty_ns() wrappers for xml2 XPath and child lookups - #847

Open
MichaelChirico wants to merge 1 commit into
xpath-skillfrom
empty-ns
Open

MichaelChirico wants to merge 1 commit into
xpath-skillfrom
empty-ns

Conversation

@MichaelChirico

Copy link
Copy Markdown
Contributor

This copies the {lintr} innovation to use these wrappers to avoid the notable overhead of {xml2} to pursue ns lookup by default in too many cases where it doesn't matter. See #846 (comment) for some sample timings.

@randy3k

randy3k commented Nov 10, 2026

Copy link
Copy Markdown
Member

Interesting. After merging #846 and this, I will make a CRAN release.

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against #846; I found no correctness issues. The changed lookups operate on namespace-free parser XML, and explicit namespace overrides still work.

Local focused provider tests passed with R 4.6.1 and xml2 1.6.0. The parse, navigation, refactoring, semantic-token and pipe-hint suites also passed with the minimum supported xml2 1.2.2. A representative lookup benchmark showed the expected speedup. GitHub checks are still running or queued.

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.

3 participants