I have a XSLT that I'm executing via the xdmp:invoke()
function and I'm running into very long processing times to see any result (in some instances timing out completely after max time out of 3600s is reached). This XSLT runs approximately in 5sec in Oxygen editor. Some areas I think maybe impacting performance:
- The XSLT produces multiple output files, using
xsl:result-document
. The MarkLogic XSLT processor outputs these as result XML nodes, as it cannot physically save these documents to a file system. - The XSLT builds variables that contain xml nodes, which then are processed by other template calls. At times these variables can hold a large set of XML nodes.
I've done some profiling on the XSLT and it seem that building the variables seems to be the most time consuming part of the execution. I'm wondering why that's the case and why does it run a lot faster on the saxon processor?
Any insight is much appreciated.