Do you have a self-contained example that shows the behavior?
Thanks in advance, Christian
Actually looking at the compilation information it looks like something more is going on there. \
This example returns the following compilation information and optimized query:
declare %basex:inline(0) function local:test() { for $x in 1 to 200 return 1 };
local:test()
Compiling: - pre-evaluate range expression to range sequence: (1 to 200) - pre-evaluate range sequence to singleton xs:string sequence: (1 to 200) -> util:replicate("", 200) - pre-evaluate util:replicate(items,count) to singleton xs:integer sequence: util:replicate(1, 200) - pre-evaluate FLWOR expression to singleton xs:integer sequence: for $x_0 in util:replicate("", 200) retu... -> util:replicate(1, 200) - inline local:test#0 Optimized Query: util:replicate(1, 200)
-----
But trying to return prof:variables() returns the following compilation information and optimized query:
for $x in 1 to 2 return prof:variables()
Compiling: - pre-evaluate range expression to range sequence: (1 to 2) - pre-evaluate range sequence to singleton xs:string sequence: (1 to 2) -> util:replicate("", 2) Optimized Query: for $x_0 in util:replicate("", 2) return prof:variables()
It looks like there is an issue both with prof:variables(), and maybe with inlining. Why is the compilation for the first example tries to inline the function even if I have defined it to 0? in BaseX 8.4.4 that doesn't happen.
Thanks again,
George