Skip to content

incorrect-test-object-name XSL transformation exceeds 100ms threshold on large XMIR files #990

Description

@volodya-lombrozo

I'm getting performance warnings when running lints against eo-runtime:

[WARNING] XSL transformation 'incorrect-test-object-name' took 119ms, whereas threshold is 100ms
[WARNING] XSL transformation 'incorrect-test-object-name' took 107ms, whereas threshold is 100ms

What happens: For each test object (@name starting with +) the transformation calls eo:escape-plus(@name) (a user-defined function that manipulates the name string) and then matches(..., $regexp) where $regexp is a constant defined inside the for-each. On XMIR files with many test objects the per-element function-call overhead adds up.

What should happen: The transformation completes within the 100ms threshold. Moving $regexp to a top-level variable so Saxon can cache the compiled pattern, and avoiding the user-defined function call where a simple string operation suffices, would help.

Metadata

Metadata

Labels

bugSomething isn't workinggood-titleThe title was checked and improved by ChatGPT

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions