Skip to content

fix(#992): optimize rt-without-atoms XSL with xsl:key#1040

Open
ImilB wants to merge 1 commit into
objectionary:masterfrom
ImilB:issue-992
Open

fix(#992): optimize rt-without-atoms XSL with xsl:key#1040
ImilB wants to merge 1 commit into
objectionary:masterfrom
ImilB:issue-992

Conversation

@ImilB

@ImilB ImilB commented Jul 14, 2026

Copy link
Copy Markdown

Closes #992.

Problem

The rt-without-atoms XSL transformation exceeds 100ms threshold on large XMIR files (~128-129ms).

Root Cause

The check not(//o[eo:atom(.)]) scans the entire document when no atom is found.
eo:atom(.) = exists($o/o[@name=$eo:lambda]) performs a child lookup per element.
When the XMIR file has no atoms, every element is visited, making the cost O(n × degree).

Solution

Added xsl:key for fast lookup of atoms.

Signed-off-by: ImilB <kiwiyt09a@gmail.com>

@volodya-lombrozo volodya-lombrozo 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.

@ImilB Thank you for the contribution! But these changes require some sort of a test. It would be nice to have some proof that these changes are actually improving performance

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.

rt-without-atoms XSL transformation performance issue with large XMIR files

2 participants