Everything has a cost. Setting up a 'test.xqy' that calls xdmp:sleep(1000), we can measure that cost. I'd encourage you to try a similar test on your hardware, with queries similar to the ones you wish to invoke.

for $i in 1 to 10
return xdmp:sleep(1000),
xdmp:query-meters()/*[1]
=> PT10.00149S

for $i in 1 to 10
return xdmp:value('xdmp:sleep(1000)'),
xdmp:query-meters()/*[1]
=> PT10.004053S

for $i in 1 to 10
return xdmp:invoke('test.xqy'),
xdmp:query-meters()/*[1]
=> PT10.004423S

-- Mike

On 2009-04-15 09:24, Eric Palmitesta wrote:
How expensive is xdmp:invoke?  Is it a heavyweight call, or fairly
lightweight?

It seems fast, but this is from a single-thread perspective.  I'll never
really know until a real load leans on it.  Anyone have experience with
this?

Cheers,

Eric
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to