I know some of you are waiting for BaseX 8.6, and I promised to make it happen until end of this year. I am afraid we won’t make it in time, but you can definitely expect the new version in January!
Thanks again for all the work.
The problem itself is a generic one and not limited to BaseX or XQuery. Did you try rewrite your function calls to tail calls [1]? Another alternative is to increase the stack size of Java (via the -Xss flag).
I'm curious, what value do you recommend here? I've been using it for BaseX with -Xss4m for a long time, but I'm sure that is too much.